Visual Studio (2010 & 11) 继续引用 .net 4 程序集,即使在安装了 .net 4.5 之后 [英] Visual Studio (2010 & 11) keep referencing the .net 4 assemblies, even after .net 4.5 is installed
问题描述
.Net 4.5安装到目录
.Net 4.5 installs to the directory
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework\v4.0.30319
Visual Studio 2010 安装 .Net 4.0 到目录
Visual Studio 2010 installs .Net 4.0 to the directory
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
即使在 VS 2010 之前安装了 .Net 4.5.现在,无论我做什么,VS 2010 和 VS 11 都会继续引用
Even if .Net 4.5 is installed prior to VS 2010. Now, no matter what I do, both VS 2010 and VS 11 keep referencing the assemblies in
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
即使我从项目中删除程序集,并通过浏览到 4.5 目录添加程序集
Even if I remove the assembly from the project, and add the assembly by browsing to the 4.5 directory
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework\v4.0.30319
如何让 Visual Studio 引用位于此处的 .Net 程序集
How do I get Visual Studio to reference the .Net assemblies located here
C:\Windows\Microsoft.NET\Framework\v4.0.30319 ??
C:\Windows\Microsoft.NET\Framework\v4.0.30319 ??
谢谢
推荐答案
您必须更新目标框架版本并在项目属性中选择 .Net 4.5:
You have to update the target framework version and choose .Net 4.5 in project properties:
这篇关于Visual Studio (2010 & 11) 继续引用 .net 4 程序集,即使在安装了 .net 4.5 之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!