且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Visual Studio 2005中使用.Net Framework 3.5

更新时间:2023-01-13 08:31:51

由于VS 2005是为.Net Framework 2设计的,因此应向系统库添加必要的引用
Since VS 2005 is designed for .Net framework 2, you should add the necessary references to system libraries manually.


.如果您只有Visual Studio,则仍可以使用Framework 3.5或4.0.关键是:构建使用C#编译器和MSBuild,后者带有可再发行框架免费提供.

您可以使用Visual Studio 2005开发代码,并使用v.2.0进行构建.然后,您可以找到MSBuild和csc.exe(C#编译器),阅读描述并使用一个或另一个来手动重建项目.您还可以手动编辑* .csproj文件(有一个新版本的示例很好;您可以在CodeProject中找到很多文件)并增加项目的目标平台.

不幸的是,除非手动进行所有更改,否则您将无法使用平台的新功能.

这是替代方法:使用开源SharpDevelop: http://en.wikipedia.org/wiki/SharpDevelop [ ^ ].它将允许您使用Framework v.4.0或更高版本.

—SA
You still can use Framework 3.5 or 4.0 if you only have Visual Studio. The thing is: the build uses C# compiler and MSBuild which comes free with redistributable framework.

You can develop the code with Visual Studio 2005 and build it with v.2.0. Then, you can locate MSBuild and csc.exe (C# compiler), read description and use one or another for manual re-build of your project. You can also manually edit your *.csproj files (good to have a sample of a new version; you can find a lot in CodeProject) and increase the target platforms of the project.

Unfortunately, you won''t be able to use new features of the platform unless you do all changes manually.

This is the alternative: use Open Source SharpDevelop: http://en.wikipedia.org/wiki/SharpDevelop[^]. It will allow you to use Framework up to v.4.0.

—SA


您还可以使用Visual Studio的免费版本:Visual C#Express.可从 http://www.microsoft.com/express/Downloads/ [ ^ ].
You also have the possibility to use free version of Visual Studio: Visual C# Express. It''s downloadable from http://www.microsoft.com/express/Downloads/[^].