简体   繁体   English

如何解决/解决异常未找到框架“ .NETFramework,Version = v4.6.1”的参考程序集?

[英]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. 而且我无法更改任何项目属性,在所有属性窗口中都出现错误。

Either select "Download the targeting pack for..." from the dialog, or open the Visual Studio Installer, click "Modify" and select the 4.6.1 targeting pack from "Individual components": 从对话框中选择“为...下载目标包”,或打开Visual Studio安装程序,单击“修改”,然后从“单个组件”中选择4.6.1目标包:

在此处输入图片说明

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.

相关问题 如何修复`您的项目未引用“.NETFramework,Version=v4.6.1”框架...` - How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...` 未找到框架“.NETFramework,Version=v4.6.2”的参考程序集 - The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found 找不到Azure devops构建失败的NETFramework,Version = v4.6.1“ - Azure devops build failed NETFramework,Version=v4.6.1" were not found 在RHPL中找不到框架“ .NETFramework,Version = v4.5.1”的参考程序集 - The reference assemblies for framework “.NETFramework,Version=v4.5.1” were not found in RHPL 在TFS2010中找不到框架“.NETFramework,Version = v4.5”的引用程序集 - reference assemblies for framework “.NETFramework,Version=v4.5” were not found in TFS2010 使用 Docker .NET 核心映像构建 WinForms C# 应用程序导致错误:.NETFramework,Version=v4.6.1 were not found - Building a WinForms C# application with Docker .NET Core image results to an error : .NETFramework,Version=v4.6.1 were not found 已使用 '.NETFramework,Version=v4.6.1' 而不是项目目标框架 ' 恢复 - was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework ' 解决错误“Microsoft.NETCore.App 1.0.0不支持框架.NETFramework,Version = v4.6.1” - Solving error “Microsoft.NETCore.App 1.0.0 does not support framework .NETFramework,Version=v4.6.1” 带有 .net framework 4.6.1 的 Asp.net Core 2.0 - 找不到参考程序集 '.NETFramework/v4.6.1/Microsoft.CSharp.dll - Asp.net Core 2.0 with .net framework 4.6.1 - Cannot find reference assembly '.NETFramework/v4.6.1/Microsoft.CSharp.dll dotnet pack - 错误 MSB3644: .NETFramework,Version=v3.5 的参考程序集未找到 - dotnet pack - error MSB3644: The reference assemblies for .NETFramework,Version=v3.5 were not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM