[英]How should I fix/resolve exception The reference assemblies for framework “.NETFramework,Version=v4.6.1” were not found?
I tried to load a project I have and got this exception: 我尝试加载我拥有的项目并遇到以下异常:
Severity Code Description Project File Line Suppression State Error The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. 严重性代码说明项目文件行抑制状态错误找不到框架“ .NETFramework,Version = v4.6.1”的参考程序集。 To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. 要解决此问题,请为此框架版本安装SDK或Targeting Pack,或将您的应用程序重新定位到已为其安装SDK或Targeting Pack的框架版本。 Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. 请注意,程序集将从全局程序集缓存(GAC)中解析,并将代替参考程序集。 Therefore your assembly may not be correctly targeted for the framework you intend. 因此,您的程序集可能没有正确地针对您想要的框架。
And each time I'm trying to reload the project while loading it I'm getting this window: 每次我尝试在加载项目时重新加载项目时,都会得到一个窗口:
I'm not sure what to download and where from. 我不确定要下载什么以及从哪里下载。
And I can't change any of the project properties I'm getting error in all the properties windows. 而且我无法更改任何项目属性,在所有属性窗口中都出现错误。
Windows->搜索-> Visual Studio安装程序->修改->单个组件并检查正确的版本
Or you can directly download the targeting pack from Microsoft's website here: https://www.microsoft.com/en-us/download/details.aspx?id=49978 或者,您可以从Microsoft网站直接下载定位包: https : //www.microsoft.com/en-us/download/details.aspx?id = 49978
You can find all kind of SDKs for both .Net Framework as well as .Net Core on the Microsoft site: https://dotnet.microsoft.com/download/visual-studio-sdks 您可以在Microsoft网站上找到适用于.Net Framework和.Net Core的所有类型的SDK: https : //dotnet.microsoft.com/download/visual-studio-sdks
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.