TFS 团队构建数据库构建间歇性失败,缺少 dbschema 参考 TSD01236
我有一个正在构建数据库项目的团队。一段时间以来,构建间歇性失败。几个项目成功构建,但解决方案中的“主”项目由于此错误
“”D:\ Builds \ 13 \ TeamProjectName \ my_build_name \ Sources \ my.project.name \ master.dbschema而无法构建:构建错误 TSD01236 : 无法加载 D:\BUILDS\13\TeamProjectName\my_build_name\SOURCES\my.project.name\MASTER.DBSCHEMA。 [D:\Builds\13\TeamProjectName\my_build_name\Sources\my.project.name\my.project.name.dbproj]""
(更改名称以保护无辜者)
这看起来文件不存在,但它是作为文件包含在数据库项目中,并且我打开了足够的日志记录,因此我可以看到该文件的“get”。我已经通过远程连接到构建机器来验证 dbschema 文件是否存在。
重新运行构建总是能修复它;远程连接到计算机并在解决方案上运行 msbuild 始终有效;在 Vs.net 中远程处理和加载数据库解决方案并重建始终有效。使用该解决方案的开发人员永远不会看到此错误。
谷歌搜索该错误代码并没有多大帮助,就像 MSBuild 一样,我看不到发送到 vsdbcmd 的命令行(我什至不知道它是否正在使用,msbuild 可能会以另一种方式访问它) 。
我们正在运行 tfs 2010,但构建正在运行“升级”模板,并正在执行手写的构建文件,该文件执行数据库构建以及其他一些重要的内容。将所有这些更改为新的构建模板可能会不受欢迎,除非有充分的理由认为这将是一个小问题,因为这是一个小问题。
我的解决方案是猜测,因为我无法重复重现该问题:
- 等待,看看是否有足够的失败显示出某种模式。我怀疑要做点什么 构建是如何触发的,它是在计时器上进行的,而不是进行 CI。 手动触发似乎不会失败。
- 将构建更改为“重建”并希望刷新某些内容,
- 更改引用解决方案,如下所示 msdn
- (疯狂猜测)将构建模板更改为 2010和/或使用不同的方法重写整个事情以使其工作。
I have a team build that is building a database project. The build has been failing intermittently for a while. Several of the projects build successfully but the "main" project in the solution fails to build because of this error
""D:\Builds\13\TeamProjectName\my_build_name\Sources\my.project.name\master.dbschema : Build error TSD01236: Failed to load D:\BUILDS\13\TeamProjectName\my_build_name\SOURCES\my.project.name\MASTER.DBSCHEMA. [D:\Builds\13\TeamProjectName\my_build_name\Sources\my.project.name\my.project.name.dbproj]""
(names changed to protect the innocent)
This looks like the file is not there, but it is included as a file in the database project and I have enough logging turned on so I can see the "get" for that file. I have verified by remoting to the build machine that the dbschema file IS there.
Rerunning the build always fixes it; remoting to the machine and running msbuild on the solution always works; remoting in and loading the database solution in Vs.net and rebuilding always works. Developers working with the solution never see this error.
Googling on that error code hasn't helped much, as with MSBuild I can't see the command line that is being send to the vsdbcmd (i don't even know if that is being used, msbuild may access it in another way).
We are running tfs 2010 but the build is running the "upgrade" template and is executing a hand written build file that executes the database build and then some other vital stuff. Changing all that to the new build template will probably be unpopular unless there is good reason to think it will be a low amount of work as this is a minor niggle.
my solutions are guesses as I can't repro the issue repeatably:
- wait, see if enough fails show a pattern. I suspect something to do
with how the build is triggered, it is on a timer, not doing CI.
manual triggers seem not to fail. - change the builds to "rebuild" and hope that flushes something out
- change the referencing solution as at this msdn
- (wild guess) change the build templates to 2010 and/or rewrite the whole thing to work using a different method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论