NuGet auto package restore does not work with MSBuild

后端 未结 12 2275
粉色の甜心
粉色の甜心 2020-12-02 08:51

I\'m trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore al

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 09:47

    In Visual Studio 2017 - When you compile using IDE - It will download all the missing nuget packages and save in the folder "packages".

    But on the build machine compilation was done using msbuild.exe. In that case, I downloaded nuget.exe and kept in path.

    During each build process before executing msbuild.exe. It will execute -> nuget.exe restore NAME_OF_SLN_File (if there is only one .SLN file then you can ignore that parameter)

提交回复
热议问题