Can I develop for .net 2.x in Visual Studio 2008?

Can I develop only for .net 2.0 working with Visual Studio 2008?

Thank!

+1


source to share


4 answers


Check out this article - http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx

Now you can stop 2005 ...



I still use 2.0 projects in VS 2008 on a weekly basis and works great.

+9


source


Yes, by setting the project property, but remember that you are really targeting .NET 2.0 SP1 (which is required for .NET 3.5, effectively).



This means that if you start using DateTimeOffset (introduced in .NET 2.0SP1) the compiler will think everything is fine and dandy - but if you deploy your application to a Vanilla.NET 2.0 box, it won't work.

+7


source


Yes, VS2008 supports multi-targeting. Check the project properties where you can choose the target framework.

0


source


Go to your project's Properties page and go to the Application tab. In the Target Framework section, you must set the version you want to build for.

Note that the cool thing about VS 2008 is that even if you are targeting 2.0, you can still use some new language features in C # like "var" etc. even if you are not using 3.5 !

0


source







All Articles