简体   繁体   English

VS 2017 - 旧解决方案项目中缺少 NuGet 包

[英]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.我查看了 NuGet 设置,它设置为自动下载任何丢失的 Nuget 包。
  2. I also tried removing and re-installing the missing package in the NuGet Manager.我还尝试在 NuGet 管理器中删除并重新安装丢失的包。
  3. Clean the build and rebuilt the project.清理构建并重建项目。
  4. Right-clicked on the Solution and selected 'Restore NuGet Packages右键单击解决方案并选择“还原 NuGet 包”

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.另外,删除binobj文件夹。

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.

相关问题 VS2017解决方案文件和nuget包位置 - VS2017 solution files and nuget package locations VS 2019 解决方案资源管理器引用旧 Nuget 包中的文件 - VS 2019 Solution Explorer references files from old Nuget packages 解决方案打开后,VS2017 NuGet'Get-Package -ListAvailable'失败 - VS2017 NuGet 'Get-Package -ListAvailable' fails once solution opened 从同一解决方案中的另一个 nuget 包项目引用 nuget 包项目 - Reference nuget package project from another nuget package project in same solution 取消绑定解决方案或项目 VS 2017 的源代码管理 - Unbind Source Control for Solution or Project VS 2017 如何从Visual Studio 2017 RC中的.NET Core MSBuild项目创建NuGet包? - How do you create a NuGet package from a .NET Core MSBuild project in Visual Studio 2017 RC? 此项目引用此计算机上缺少的 NuGet 包 - This project references NuGet package(s) that are missing on this computer 将旧的VB.NET项目从VS2013迁移到VS2017 - Migrate old VB.NET project from VS2013 to VS2017 缺少VS2017的``管理NuGet软件包''对话框 - Manage NuGet Packages dialog missing VS2017 是否可以从VS 2017中的解决方案运行项目而不将其分配为启动项目? - Is it possible to run a project from a solution in VS 2017 without it being assigned as the start project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM