NuGet Package Restore is not restoring packages on build

前端 未结 2 1804
野趣味
野趣味 2021-02-14 01:57

I am moving our source code from Vault to TFS, not bothering with the migration or anything, just pulling a get latest in vault and adding it to TFS.

The solution has go

2条回答
  •  情书的邮戳
    2021-02-14 02:42

    I figured it out, and I found the answer here: MSBuild not running BuildDependsOn tasks from an imported project

    The problem (after looking through the Diagnostic verbosity build output) was that the BuildDependsOn setting was getting un-set. My project files each had the import statement

    
    

    but that statement was at the beginning of the XML tree. Apparently the import for Microsoft.CSharp.targets can interfere with that import and thus the BuildDependsOn.

    My solution was to move the nuget.targets import to below the Microsoft.CSharp.targets import. Now everything builds beautifully.

提交回复
热议问题