TeamCity 4.5 无法识别 nant 脚本中的 trycatch 元素

发布于 2024-08-03 12:38:44 字数 667 浏览 3 评论 0原文

我们的团队最近升级到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

说好的呢 2024-08-10 12:38:44

我认为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文