Visual Studio 2015 Update 3 TFS 中的数据库项目构建错误

Database project build errors in TFS with Visual Studio 2015 Update 3

我有一个包含 Web 应用程序和多个数据库项目的解决方案。使用旧的 XAML 定义时,我可以在 TFS 中编译和生成数据库部署文件。使用 TFS 2015 中引入的新定义,我只能生成 Web 应用程序部署文件。

这是部分日志 -

2016-10-28T22:14:48.6892904Z Build started 10/28/2016 4:14:48 PM.
2016-10-28T22:14:48.8883071Z      1>Project "E:\TFS\agent\_work\s\Test.Client.sln" on node 1 (default targets).
2016-10-28T22:14:48.8893071Z      1>ValidateSolutionConfiguration:
2016-10-28T22:14:48.8903071Z          Building solution configuration "release|any cpu".
2016-10-28T22:14:49.0633142Z ##[warning]E:\TFS\agent\_work\s\..\Databases\Test\Test.DB.Test.sqlproj.metaproj(0,0): Warning MSB4046: Error reading project file "..\Databases\Test\Test.DB.Test.sqlproj": Could not find a part of the path 'E:\TFS\agent\_work\Databases\Test\Test.DB.Test.sqlproj'.
2016-10-28T22:14:49.0643150Z      1>Project "E:\TFS\agent\_work\s\Test.Client.sln" (1) is building "E:\TFS\agent\_work\s\..\Databases\Test\Test.DB.Test.sqlproj.metaproj" (2) on node 1 (default targets).
2016-10-28T22:14:49.0693159Z      2>E:\TFS\agent\_work\s\..\Databases\Test\Test.DB.Test.sqlproj.metaproj : warning MSB4046: Error reading project file "..\Databases\Test\Test.DB.Test.sqlproj": Could not find a part of the path 'E:\TFS\agent\_work\Databases\Test\Test.DB.Test.sqlproj'.
2016-10-28T22:14:49.0823182Z      2>Done Building Project "E:\TFS\agent\_work\s\..\Databases\Test\Test.DB.Test.sqlproj.metaproj" (default targets).

我找不到很多关于新构建定义的信息。有人可以帮忙吗?

谢谢

首先仔细检查你的两个定义 XAML 和 vNext 的区别。

并检查构建代理上的文件路径E:\TFS\agent\_work\s\..\Databases\Test\Test.DB.Test.sqlproj,是否有相应的文件。

并尝试直接构建您的数据库项目,而不是构建整个解决方案,以查看是否有一些有用的信息可用于故障排除。


更新

Tips:

  • You can also build MSBuild project (.*proj) files.
  • If you are building a customized MSBuild project file, we recommend you use the MSBuild step instead of the Visual Studio Build step.

Source Link: Visual Studio Build

我们弄清楚了这有什么问题。我们的数据库项目在另一个文件夹中。我们需要将服务器路径映射到 Build 存储库中的本地路径。加上这个之后就可以建数据库工程了