如何修复您的项目未引用".NETFramework,Version = v4.6.1";框架... [英] How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...`

查看:1493
本文介绍了如何修复您的项目未引用".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时(从此处下载) )他们说

I got this error 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. after checkout a project from company repository and rebuild on my machine.
When I try to install .Net461 (downloaded from here) they said

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

.NET Framework 4.6.1 or a later update is already installed on this computer.

这是我计算机上的所有.NET Framework版本(Windows 10 1703)

This is all .NET framework versions on my machine (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>

如何解决此错误?

推荐答案

我发现了这个

I found this link from a google search and tried it and it fixed my issue so I thought I might share that deleting the obj folders seems to work.

论坛中的声明

我从Google搜索中找到了此链接,并尝试了它,它解决了我的问题,所以我想我可以分享一下删除obj文件夹的方法.

I found this link from a google search and tried it and it fixed my issue so I thought I might share that deleting the obj folders seems to work.

两个用户发现此问题已解决.

two users found that this fix the issue.

大多数人还发现先清理干净,然后手动删除obj文件夹,然后重做nuget还原似乎可以解决此问题.

most also found doing a clean and then removing the obj folder by hand then redoing a nuget restore seemed to fix the issue.

这篇关于如何修复您的项目未引用".NETFramework,Version = v4.6.1";框架...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆