Visual Studio的TeamCity生成步骤中的MSBUILD错误MSB4025 [英] MSBUILD Error MSB4025 in TeamCity build step for Visual Studio

查看:320
本文介绍了Visual Studio的TeamCity生成步骤中的MSBUILD错误MSB4025的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行TeamCity构建时,唯一的构建步骤是运行器类型为Visual Studio(sln),则出现以下错误:

When I run my TeamCity build with the only build step being of runner type Visual Studio (sln), I get the following error:

C:\TeamCity\buildAgent\work\4978ec6ee0ade5b4\Test\Code\Test.sln(2, 1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 2, position 1.

这是在运行TeamCity Professional 8.1.1(内部版本29939)的专用CI服务器上.此服务器上还有其他几个运行良好的构建.

This is on a dedicated CI server running TeamCity Professional 8.1.1 (build 29939). There are several other successfully-running builds on this server.

奇怪的是,同一构建在我的开发机上的TeamCity上成功运行.我遵循了一个类似问题的答案,并复制了指定的文件夹,但这没有帮助.

The odd bit is that the same build runs successfully on TeamCity on my dev machine. I followed an answer to a similar question, and copied the specified folders across, but that didn't help.

我确定项目/解决方案文件不是无效的,因为除了在我的开发箱上运行的内部版本外,我还在Visual Studio中打开了该解决方案,并在那里毫无问题地构建了它.

I'm sure the project/solution file isn't invalid because in addition to the build running on my dev box, I have opened the solution in Visual Studio and built it there with no problems.

有什么建议吗?

推荐答案

我刚刚解决了这个问题.

I just fixed this.

在Test.sln文件中查找未关闭的Project或EndProject标记.对我们来说,EndProject丢失了,它打破了团队合作精神,但是在Visual Studio中没有问题.

Look inside the Test.sln file for Project or EndProject tags that aren't closed. For us, the EndProject was missing and it broke on teamcity, but no issues in Visual Studio.

这篇关于Visual Studio的TeamCity生成步骤中的MSBUILD错误MSB4025的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆