Can I develop for .NET Framework 4 in Visual Studio 2008?

别来无恙 提交于 2019-11-26 17:58:40

You cannot use Visual Studio 2008 to develop 4.0 applications in a supported manner. Currently only Visual Studio 2010 can be used to develop 4.0 apps. Starting with 2008 you can use it to develop for earlier versions of the framework but not later ones.

From ScottGu's blog:

There isn't any way to target .NET 4 from VS08 and use new features. Having said that, .NET4 is upwards comaptible with .NET 3.5 - so applications you build targeting .NET 3.5 with VS08 should work fine on top of .NET 4.

Roman

The only way to develop for .NET 4 is to use Visual Studio 2010. However, if you do create a managed assembly in Visual Studio 2008, you could run in on a machine with .NET 4 run-time installed.

AceMark

As many previous Visual Studio releases, you cannot develop a higher version framework application (in this question .NET 4.0) using a Visual Studio for a lower version framework (in this question Visual Studio 2008), just the same as you can't develop 3.5 applications in Visual Studio 2005, and so on and so forth.

You may try updating the references from .NET 3.5 to .NET 4.0 (for example, using System.dll from .NET 4.0 instead of the one referenced directly by the project) every time you develop applications, but I don't think it would recognize the new features from the new framework version.

My guess is that you have found one of those fabulous cases where it is just going to complain to no end. You will likely be better off using the beta of VS2010 or removing the validationMode attribute.

You could, in theory, try attaching to appropriate worker process and get some debugging love - but it still might not work.

Xico

You can target the .NET Framework 4.0 using Visual Studio 2008. You just have to wait for the right plugins (create Silverlight 4 projects, etc.). For instance, you can use .NET Framework 3.5 in Visual Studio 2005 with the correct SDK.

Fred

If you want to develop for .NET 4 without the pricey Visual Studio 2010 Pro, you can try Mono:

Mono Project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!