当我在VS2019中进入程序包管理器控制台时,我看到以下信息
NuGet Enable Package Restore Fix To fix package restore: 1. Please enable package restore in Visual Studio FIRST. 2. Run the command: Install-NuGetEnablePackageRestoreFix 3. Restart Visual Studio. This should fix that pesky broken build you are experiencing. To uninstall: 1. Run the command: Remove-NuGetEnablePackageRestoreFix 2. Uninstall-Package NuGetEnablePackageRestore 3. Restart Visual Studio.
为什么告诉我这件事?
我尝试按照第一组说明进行操作,但消息仍然存在。
Package Manager还原已启用。
为什么告诉我这件事?
[在某些VS2010,VS2012等旧VS版本中... nuget package restore
选项不是VS组件的一部分。为了轻松恢复软件包,有一个nuget软件包NuGetEnablePackageRestore(最新更新时间为2012年7月9日)来帮助我们恢复软件包。
此旧的nuget程序包包含enablepackagerestore.psm1
和init.ps1
。这是init.ps1
的内容:
因此,如果有人在当前项目或解决方案中使用软件包NuGetEnablePackageRestore
,则init.ps1将始终执行并显示该消息以作为提醒。
但是对于VS2015,VS2017.VS2019,VS现在包含package restore function本身。因此,在VS2019中不需要此软件包,您可以随意卸载该软件包或j 必须忽略该软件包,因为它只是该nuget软件包的提醒。