简体   繁体   English

Visual Studio 2019在调试后自动删除了nuget包

[英]Visual studio 2019 auto removed nuget packages after debug

Every time I add any nuget package to my .net core application, it stays for a bit but it seems like after I start a debug and end it, the nuget package removed automatically from Visual studio project. 每次我将任何nuget包添加到我的.net核心应用程序时,它会保持一段时间但似乎在我开始调试并结束它之后,nuget包会自动从Visual Studio项目中删除。

Is any thing changes in visual studio 2019? 视觉工作室2019有什么变化吗?

After searching on internet I found solution on this developer community Website. 在网上搜索后,我在这个开发者社区网站上找到了解决方案

  1. Close VS2019 关闭VS2019
  2. Delete the ".vs" folder 删除“.vs”文件夹
  3. Open VS2019, add the NuGet package 打开VS2019,添加NuGet包
  4. Save all 保存全部

I suspect "Save all" after adding a NuGet package might be key here. 我怀疑在添加NuGet包后“全部保存”可能是关键所在。

You should see: In the NuGet.Config file, DisabledPackageSources tag shows you the sources which are currently disabled, so if you want to make them be active, add the sources under the ActivePackageSource. 您应该看到:在NuGet.Config文件中,DisabledPackageSources标记显示当前已禁用的源,因此如果要使它们处于活动状态,请在ActivePackageSource下添加源。 Anyway, since it works well now after you edit the DisabledPackageSources, at least, we make sure that it would be related to the NuGet.Config file. 无论如何,因为它在你编辑了DisabledPackageSource之后现在运行良好,至少,我们确保它与NuGet.Config文件有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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