TFS - 不检索引用项目的Nuget包

时间:2015-12-11 11:17:34

标签: visual-studio tfs

我们有一个看起来像这样的文件夹结构

Customer.Common
Customer.Data
Customer.WebPortal
Customer.ConsoleApp

Common和Data项目在多个Visual Studio解决方案之间共享。它们未使用“共享项目”添加到解决方案中。功能,他们只是通过添加现有项目'添加如果这有所作为

Customer.WebPortal
    Customer.Common
    Customer.Web
    Customer.Data


Customer.ConsoleApp
    Customer.ConsoleApp.
    Customer.Data
    Customer.Common

TFS未检索Customer.Common项目的Nuget包。所以它不会构建。

Customer.Data项目构建正常,但这只是因为WebPortal项目也具有相同的nuget依赖项。

TFS是2015年,开发人员正在使用VS2013和VS 2015的混合

1 个答案:

答案 0 :(得分:0)

在构建Customer.WebPortal时,MSBuild将运行此命令:nuget.exe restore xxx\Customer.WebPortal.sln。所以这一步是针对sln级别的,它不会恢复你的客户。常见的项目。

您的情况有两种方式:

  • 将Customer.Common的nuget依赖项添加到Customer.WebPortal    (简单有效)
  • 构建三个项目而不是构建整个解决方案(在此 例如,MSBuild将运行nuget.exe restore xxx\xx.csproj
相关问题