visual studio 2010 C#编程时 没有.NET framework 2.0目标框架的解决办法
2012-08-27 14:34
661 查看
解决办法是安装Framework .NET 3.5 Sp1
因为visual studio 2010是依赖.NET Framework 3.5 Sp1来识别其它版本的.NEt framework的。
如果你的电脑上装了.NEt framework 2.0 .NEt framework3.0 和.NEt framework 4.0,而没有装.NEt framework3.5 sp1的话,vs 2010只能识别到4.0版本的目标框架。
下面文章是来自官方的解释:http://blogs.msdn.com/b/webdev/archive/2010/04/22/framework-net-3-5-sp1-required-for-targeting-lower-frameworks-2-0-3-0-and-3-5-multi-targeting-using-visual-studio-2010.aspx
22 Apr 2010 4:02 PM
5
We have had some customers ask why they are unable to target earlier frameworks .NET 2.0, 3.0 or 3.5 using Visual Studio 2010. Targeting earlier frameworks (also known as Multi-targeting) is in-fact fully supported in VS 2010, but there is apre-requisite
that .NET Framework 3.5 Sp1 must be installed on the machine for VS 2010 to be able to targetany of the earlier frameworks 2.0, 3.0 or 3.5.
During VS 2010 installation, only the latest 4.0 version of the .NET framework will be installed on your machine as part of the Visual Studio installation. So if 3.5 Sp1 was not already present on your machine, you will see only the .NET Framework 4 in the
target framework dropdown of the New Website / New Project dialogs (In these dialogs, framework dropdown is available in VS Professional and higher skus only) when creating a new website or in the property pages when changing the target of an existing website
(In property pages, framework dropdown is available in the VWD Express sku as well). You can click on the ‘More Frameworks’ link and that will take you to the download page for .NET 3.5 Sp1 (see Figure 1).
Figure 1
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/18/fade3b6b6ab4be82924929258909d588.png)
Once .NET 3.5 Sp1 is installed on your machine, restart Visual Studio and you should be able to see the lower frameworks .NET 2.0, 3.0 and 3.5 in the Visual Studio dropdowns (see figure 2).
Figure 2
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/18/0b0e0b5039ce28633b4341536415c887.jpg)
Multi-targeting – Learn More
To learn about the multi-targeting capabilities of Visual Studio 2010, see our earlier blog posts and MSDN documentation:
Visual Studio Multi-Targeting Overview (MSDN Documentation)
Multi-targeting of web projects using Visual Studio 2010
Targeting earlier .NET frameworks 2.0, 3.0, 3.5 using Visual Studio 2010
Visual Studio 2010 Property Grid Filtering
Thanks,
Bala Chirtsabesan | Visual Web Developer Team
因为visual studio 2010是依赖.NET Framework 3.5 Sp1来识别其它版本的.NEt framework的。
如果你的电脑上装了.NEt framework 2.0 .NEt framework3.0 和.NEt framework 4.0,而没有装.NEt framework3.5 sp1的话,vs 2010只能识别到4.0版本的目标框架。
下面文章是来自官方的解释:http://blogs.msdn.com/b/webdev/archive/2010/04/22/framework-net-3-5-sp1-required-for-targeting-lower-frameworks-2-0-3-0-and-3-5-multi-targeting-using-visual-studio-2010.aspx
Framework .NET 3.5 Sp1 required for targeting frameworks 2.0, 3.0 or 3.5 (multi-targeting) using Visual Studio 2010
Web Development Tools Microsoft22 Apr 2010 4:02 PM
5
We have had some customers ask why they are unable to target earlier frameworks .NET 2.0, 3.0 or 3.5 using Visual Studio 2010. Targeting earlier frameworks (also known as Multi-targeting) is in-fact fully supported in VS 2010, but there is apre-requisite
that .NET Framework 3.5 Sp1 must be installed on the machine for VS 2010 to be able to targetany of the earlier frameworks 2.0, 3.0 or 3.5.
During VS 2010 installation, only the latest 4.0 version of the .NET framework will be installed on your machine as part of the Visual Studio installation. So if 3.5 Sp1 was not already present on your machine, you will see only the .NET Framework 4 in the
target framework dropdown of the New Website / New Project dialogs (In these dialogs, framework dropdown is available in VS Professional and higher skus only) when creating a new website or in the property pages when changing the target of an existing website
(In property pages, framework dropdown is available in the VWD Express sku as well). You can click on the ‘More Frameworks’ link and that will take you to the download page for .NET 3.5 Sp1 (see Figure 1).
Figure 1
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/18/fade3b6b6ab4be82924929258909d588.png)
Once .NET 3.5 Sp1 is installed on your machine, restart Visual Studio and you should be able to see the lower frameworks .NET 2.0, 3.0 and 3.5 in the Visual Studio dropdowns (see figure 2).
Figure 2
![](https://oscdn.geek-share.com/Uploads/Images/Content/202004/18/0b0e0b5039ce28633b4341536415c887.jpg)
Multi-targeting – Learn More
To learn about the multi-targeting capabilities of Visual Studio 2010, see our earlier blog posts and MSDN documentation:
Visual Studio Multi-Targeting Overview (MSDN Documentation)
Multi-targeting of web projects using Visual Studio 2010
Targeting earlier .NET frameworks 2.0, 3.0, 3.5 using Visual Studio 2010
Visual Studio 2010 Property Grid Filtering
Thanks,
Bala Chirtsabesan | Visual Web Developer Team
相关文章推荐
- Visual Studio 2010 VC++ CLR 选择.NET 2.0/3.0/3.5框架不能编译的解决办法(转)
- Visual Studio 2010旗舰版在安装Windows Phone 7 SDK后项目模版里没有Windows Phone 项目解决办法
- Visual Studio 2010旗舰版在安装Windows Phone 7 SDK后项目模版里没有Windows Phone 项目解决办法
- Visual Studio 2010旗舰版在安装Windows Phone 7 SDK后项目模版里没有Windows Phone 项目解决办法
- SQL Server Database在C#编程下遇到的问题:“provider:SQL Network Interfaces,error:26-定位指定的服务器/实例时出错”的解决办法
- word 2010 中没有endnote加载项,解决办法
- windows XP VS2010只有.net framework4.0,没有2.0 3.5的解决办法
- 2010打开新建的网页窗体webform只有源视图没有窗体设计视图的解决办法
- Visual studio 2010 中文版正式版无法安装Silverlight4 Tools的解决办法
- Visual Studio 2010 更新NuGet Package Manager出错解决办法
- Visual studio 2010 中文版正式版无法安装Silverlight4 Tools的解决办法
- asp.net 2.0 +fckeditor2.6 远程上传 没有权限的最后的解决办法
- visual studio 2010 编程问题解决方案
- 在C#编程中要将一个表中的数据复制到另一个表中出现报错“该行已经属于另一个表”解决办法
- Microsoft Visual Studio 2010(旗舰版) 没有.Net Framework 2.0 的问题
- Framework2.0标识没有写访问权限的解决办法
- Visual studio 2010 中文版正式版无法安装Silverlight4 Tools的解决办法 Silverlight4 Tools中文版
- Visual Studio 2010 报错 "The application cannot start." 关闭 解决办法
- 【转载】使用Visual Studio 2010调试断点不起作用的问题解决办法(AutoCAD)
- Visual Studio 2010起始页中不显示最近使用的项目的解决办法