简体   繁体   English

错误:未找到 .NETFramework,Version=v5.0 的参考程序集

[英]Error: The reference assemblies for .NETFramework,Version=v5.0 were not found

I've installed VS code to build simple examples while I learn .net 5 and c# 9. But VS code doesn't recognize .net sdk 5. I can create new console projects as net 5. I've installed VS code to build simple examples while I learn .net 5 and c# 9. But VS code doesn't recognize .net sdk 5. I can create new console projects as net 5.

however I don't use properties like these;但是我不使用这样的属性; viewing problems in problems section right click > peek definition在问题部分查看问题右键单击 > 查看定义

I've searched solution for this on the net and I did things below;我已经在网上搜索了这个解决方案,我做了以下事情; setting "omnisharp: select project > my current project" reinstalling.Net SDK 5, changing omnisharp path, changing "use global mono" property as "always"设置“omnisharp:select 项目 > 我当前的项目”重新安装.Net SDK 5,更改omnisharp 路径,将“使用全局单声道”属性更改为“始终”

I have left Output screen below, you to more understand:我在下面留下了 Output 屏幕,您更了解:

[fail]: OmniSharp.MSBuild.ProjectLoader The reference assemblies for .NETFramework,Version=v5.0 were not found. [失败]:OmniSharp.MSBuild.ProjectLoader .NETFramework,Version=v5.0 的参考程序集未找到。 To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application.要解决此问题,请为此框架版本安装开发包(SDK/Targeting Pack)或重新定位您的应用程序。 You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks您可以在https://aka.ms/msbuild/developerpacks下载 .NET 框架开发人员包

[warn]: OmniSharp.MSBuild.ProjectManager Failed to load project file 'c:\Users\ilyas\Desktop.Net Notes.Net 5 and C# 9\Basics\Basics.csproj'. [警告]:OmniSharp.MSBuild.ProjectManager 无法加载项目文件“c:\Users\ilyas\Desktop.Net Notes.Net 5 和 C# 9\Basics\Basics.csproj”。 c:\Users\ilyas\Desktop.Net Notes.Net 5 and C# 9\Basics\Basics.csproj C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): Error: The reference assemblies for .NETFramework,Version=v5.0 were not found. c:\Users\ilyas\Desktop.Net Notes.Net 5 and C# 9\Basics\Basics.csproj C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common. CurrentVersion.targets(1177,5):错误:未找到 .NETFramework、Version=v5.0 的参考程序集。 To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application.要解决此问题,请为此框架版本安装开发包(SDK/Targeting Pack)或重新定位您的应用程序。 You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks您可以在https://aka.ms/msbuild/developerpacks下载 .NET 框架开发人员包

[fail]: OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loaded: c:\Users\ilyas\Desktop.Net Notes.Net 5 and C# 9\Basics\Basics.csproj [失败]:OmniSharp.MSBuild.ProjectManager 尝试更新未加载的项目:c:\Users\ilyas\Desktop.Net Notes.Net 5 和 ZD7EFA19FBE7D3972FDcsZproj6024

PS I am new to english, sorry for grammar rules PS我是英语新手,语法规则很抱歉

Finally I figured out why I get this error.最后我弄清楚了为什么会出现这个错误。 I've installed targeting framework, however "vs code" tries to get ".net 5 sdk which is within VS 2019 community".我已经安装了目标框架,但是“vs code”试图获取“VS 2019 社区中的.net 5 sdk”。 I've upgraded VS 2019 community, which solved my problem.我升级了 VS 2019 社区,解决了我的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VS 代码 - 未找到“.NETFramework,Version=v5.0”的参考程序集 - VS Code - The reference assemblies for ".NETFramework,Version=v5.0" were not found Uno 平台项目报告:未找到 .NETFramework,Version=v5.0 的参考程序集 - Uno Platform Project reports: The reference assemblies for .NETFramework,Version=v5.0 were not found 未找到框架 .NETCore、Version=v5.0 的参考程序集 - The reference assemblies for framework .NETCore, Version=v5.0 were not found .NET Core-找不到框架“ DNXCore,Version = v5.0”的参考程序集 - .NET Core - The reference assemblies for framework “DNXCore,Version=v5.0” were not found 找不到框架“.NETFramework,Version=v4.7.1”的参考程序集 - Reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found Centos .netcore找不到框架“ .NETFramework,Version = v4.6.1”的参考程序集 - Centos .netcore The reference assemblies for framework “.NETFramework, Version=v4.6.1” were not found Ranorex 构建失败 9.4.1 找不到框架“.NETFramework,Version=v4.7.2”的参考程序集 - Ranorex build fails 9.4.1 The reference assemblies for framework “.NETFramework,Version=v4.7.2” were not found Godot 无法构建 C# 脚本:找不到 .NETFramework,Version=v4.7 的参考程序集 - Godot unable to build C# scripts : The reference assemblies for .NETFramework,Version=v4.7 were not found Visual Studio 2019 v16.6 无法构建 .net5 控制台应用程序并引发错误:.NETFramework,Version=v5.0 were not found - Visual studio 2019 v16.6 can't build .net5 console application and raise errors: .NETFramework,Version=v5.0 were not found dotnet 运行报告 '.NETFramework,Version=v4.8 未找到' - dotnet run reporting '.NETFramework,Version=v4.8 were not found'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM