MSBuild 15 NuGet restore and build

前端 未结 1 1099
日久生厌
日久生厌 2021-01-07 18:21

I\'m trying to get the new MSBuild NuGet restore feature to work and having an odd problem.

If I do:

msbuild.exe mySolution.sln /p:Configuration=Rele         


        
1条回答
  •  孤城傲影
    2021-01-07 19:02

    MSBuild 15.5 will introduce a /restore flag that implements this functionality.

    Before that, it is theoretically possible to run both a restore and build in the same invocation (/t:Restore;Build) but it is unsafe as MSBuild may cache project files and not see changes made by a NuGet restore. The /restore option will clear all the affected caches before resuming with the normal build.

    0 讨论(0)
提交回复
热议问题