简体   繁体   English

包恢复是否真的需要“启用nuget包还原”?

[英]Does “enable nuget package restore” realy necessary for package recovery?

I can successfully restore package even if the option "enable nuget package restore" is not switched on in the project. 即使项目中未启用“启用nuget软件包还原”选项,我也可以成功还原软件包。 Plus it generates additional files within my solution. 加上它会在我的解决方案中生成其他文件。

With the latest version of NuGet (2.7 or above) you do not need to use the Enable NuGet Package Restore menu option if you do not want to. 如果使用最新版本的NuGet(2.7或更高版本),则不需要使用“ 启用NuGet软件包还原”菜单选项。

The latest version of NuGet, when installed in Visual Studio, will automatically restore any missing packages when your build your project. 当安装在Visual Studio中时,最新版本的NuGet将在您构建项目时自动还原所有丢失的软件包。 It does this without needing to add any new files to your solution and does not use MSBuild. 它不需要添加任何新文件到您的解决方案,并且不使用MSBuild。 It is now the recommended way of restoring NuGet packages . 现在,这是还原NuGet软件包推荐方法

You can also restore from the command line using NuGet with a command line similar to: 您也可以使用NuGet从命令行还原命令行,类似于:

nuget restore YourSolution.sln

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

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