相关疑难解决方法(0)

如何修复`您的项目未引用“.NETFramework,Version=v4.6.1”框架...`

Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.从公司存储库签出项目并在我的机器上重建后,我收到此错误 。
当我尝试安装 .Net461(从这里下载)时,他们说

此计算机上已安装 .NET Framework 4.6.1 或更高版本的更新。

这是我机器上的所有 .NET 框架版本(Windows 10 1703)

PS C:\Users\longnx\Downloads> & '.\check-dotnet-framework-version (1).ps1'

PSChildName                      Version        Release
-----------                      -------        -------
v2.0.50727                       2.0.50727.4927
v3.0                             3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation  3.0.6920.4902
v3.5                             3.5.30729.4926
Client                           4.7.03062      461814
Full                             4.7.03062      461814
Client                           4.0.0.0


PS C:\Users\longnx\Downloads>
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个错误?


2020 年 5 …

.net c# msbuild nuget nuget-package-restore

30
推荐指数
3
解决办法
1万
查看次数

标签 统计

.net ×1

c# ×1

msbuild ×1

nuget ×1

nuget-package-restore ×1