NuGet package restore for solution fails (only on the command line)

六眼飞鱼酱① 提交于 2019-12-05 14:02:57

In order for MSBuild to resolve the assemblies from the project.json file it uses a custom MSBuild task which is installed on the machine so it is globally available for MSBuild.

On your local machine these will be in the directory:

C:\Program Files (x86)\MSBuild\Microsoft\NuGet

I believe these files are installed by Visual Studio 2015.

There is also a Microsoft.NuGet.ImportBefore.props file in the directory:

C:\Program Files (x86)\MSBuild\14.0\Imports\Microsoft.Common.Props\ImportBefore

There is also a Microsoft.NuGet.ImportAfter.targets file in the directory:

C:\Program Files (x86)\MSBuild\14.0\Imports\Microsoft.Common.Targets\ImportAfter

Which is how the NuGet .props and .targets files are imported into MSBuild and made available to every project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!