[英]VS 2017 - Missing NuGet Package from an old solution project
I am working on an old project that was given to me.我正在做一个给我的旧项目。 When I try to build, I get the following error:当我尝试构建时,出现以下错误:
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\WinSCP.5.13.0\build\WinSCP.targets. App1.App.Export C:\Visual_Studio\App1.App.Export\App1.App.Export\App1.App.Export.csproj
What other methods should I try?我还应该尝试哪些其他方法?
It seems that you have missed the nuget package WinSCP 5.13.0 .您似乎错过了 nuget 软件包WinSCP 5.13.0 。
Please try these stpes:请尝试这些步骤:
First of all , the package exists under nuget.org
, so you should make sure that the nuget.org
is under your nuget package source and the checkbox is checked.首先,该包存在于nuget.org
下,因此您应该确保nuget.org
位于您的 nuget 包源下并选中了复选框。
1) clean nuget caches first or delete all files under C:\\Users\\xxx(current user)\\.nuget\\packages
. 1) 首先清理 nuget 缓存或删除C:\\Users\\xxx(current user)\\.nuget\\packages
下的所有文件。
Also , delete bin
and obj
folder.另外,删除bin
和obj
文件夹。
2) close VS, delete nuget.config
file under C:\\Users\\xxx\\AppData\\Roaming\\NuGet
. 2)关闭VS,删除C:\\Users\\xxx\\AppData\\Roaming\\NuGet
下的nuget.config
文件。
Then , reopen your project, run update-package -reinstall
under Tools
--> Nuget Package Manager
--> Package Manager Console
.然后,重新打开您的项目,在Tools
--> Nuget Package Manager
--> Package Manager Console
下运行update-package -reinstall
。
3) If it still cannot work, please try to create a new project and then install WinSCP 5.13.0
nuget package to see whether it works. 3)如果还是不行,请尝试创建一个新项目,然后安装WinSCP 5.13.0
nuget包,看看是否有效。
Also , share the whole csproj file with us so that it will help us troubleshoot the issue more quickly.另外,与我们共享整个 csproj 文件,以便它帮助我们更快地解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.