TeamCity 4.5 无法识别 nant 脚本中的 trycatch 元素
我们的团队最近升级到 TeamCity 4.5.4,但我们在 TeamCity 运行 nant 构建脚本时遇到了问题。
我们现在收到一条错误消息:Invalid element
我们在升级期间或之后没有更改构建脚本,因此我想知道我们需要进行哪些更改(如果有)才能使其再次正常工作。
导致问题的脚本部分如下:
<trycatch>
<try>
<ncover>
<snip>this does ncover stuff</snip>
</ncover>
</try>
<catch property="failure">
<echo message="At least one test failed: ${failure}"/>
<property name="fail.message" value="${failure}"/>
<property name="test.failed" value="true"/>
</catch>
</trycatch>
还有其他人遇到过这个问题吗?
Our team recently upgraded to TeamCity 4.5.4 but we're having trouble with TeamCity running our nant build scripts.
We now get an error message saying: Invalid element <trycatch>. Unknown task or datatype.
We haven't changed our build script during or after the upgrade so I'm wondering what, if any, change do we need to make to get this working again.
The part of the script that is causing problems is as follows:
<trycatch>
<try>
<ncover>
<snip>this does ncover stuff</snip>
</ncover>
</try>
<catch property="failure">
<echo message="At least one test failed: ${failure}"/>
<property name="fail.message" value="${failure}"/>
<property name="test.failed" value="true"/>
</catch>
</trycatch>
Has anyone else experienced this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 trycatch 任务是 NantContrib 的一部分。 NantContrib 可能不再包含在 team city 中。或者您的脚本需要对 nantcontrib 的更新引用。只是一个想法。
I think the trycatch task is part of NantContrib. It is possible that NantContrib isn't included with team city anymore. Or your script needs an update reference to nantcontrib. Just a thought.