在项目构建期间,NuGet会为解决方案中的每个项目向输出写入类似的消息(见下文)。这条消息太长,基本没用。只有在某人为解决方案启用NuGet包还原(解决方案中的.nuget文件夹)之后才会发生这种情况。我不想禁用包恢复,我只是想禁用此消息。
14> Restoring NuGet packages...
14> To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
14> Feeds used:
14> C:\Users\Peter\AppData\Local\NuGet\Cache
14> C:\Users\Peter\.nuget\packages\
14> Z:\Install\NugetPackages
14> https://www.nuget.org/api/v2/
14>
14> All packages listed in C:\BestProject14\packages.config are already installed.