简体   繁体   中英

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
  1. I looked at the NuGet Settings and it is set to download automatically any missing Nuget Packages.
  2. I also tried removing and re-installing the missing package in the NuGet Manager.
  3. Clean the build and rebuilt the project.
  4. Right-clicked on the Solution and selected 'Restore NuGet Packages

What other methods should I try?

It seems that you have missed the nuget package 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.

在此处输入图片说明

1) clean nuget caches first or delete all files under C:\\Users\\xxx(current user)\\.nuget\\packages .

Also , delete bin and obj folder.

2) close VS, delete nuget.config file under C:\\Users\\xxx\\AppData\\Roaming\\NuGet .

Then , reopen your project, run update-package -reinstall under Tools --> Nuget Package Manager --> Package Manager Console .

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.

Also , share the whole csproj file with us so that it will help us troubleshoot the issue more quickly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM