Saturday, September 5, 2009

Upgrade/Downgrade C# Project Target Framework.

I don’t know if this will help anyone, but I’ve been doing this for a long time.
Actually you can manually change the Target Framework in .csproj file.

Here’s how:

  1. Open .csproj in any text editor, I prefer Notepad++. This file contains XML tags.
  2. Now in PropertyGroup node, look for child node named TargetFrameworkVersion
  3. and if your project version is 3.5, and want to target 2.0, just change the value to 2.0, vice versa.

But if you want to upgrade your 2.0 cs project in Visual Studio IDE, just right click on the project, and click Upgrade Project.

That’s all.

Note: This doesn’t work all the time. Reason was, some 3.5 methods and properties doesn’t exist in 2.0. duh..

cheers :)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.