禁用“执行运行时合同检查”对于项目挂起TFS Build(2010)? [英] Disabling "perform runtime contract checking" for project hangs TFS Build (2010)?

查看:92
本文介绍了禁用“执行运行时合同检查”对于项目挂起TFS Build(2010)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


用于团队构建问题疑难解答 
我禁用了"Perfmon运行时合同检查"这几个项目中的选项 - 我的团队构建挂起&现在就在UnitTests完成Debug config的运行之后:


结果文件:  D:\ TfsBuilds \ 0102 \ PROJECT \ UnitTestsAndStaticAnalysis\TestResults \ BUILDMASTER.Build_BUILDNAME 2010-06-14 15_21_56_Any CPU_Debug.trx


测试设置:本地测试运行


测试运行错误。


等待发布...


测试运行的发布结果BUILDMASTER.Build@BUILDNAME 2010-06-14 15:21:56_Any CPU_Debug to http:// tfs:8080 / PROJECTCOLLECTION ...


.....................进程无法访问文件'D:\ TfsBuilds \ 0102 \ PROJECT \ UnitTestsAndStaticAnalysis\TestResults \ BUILDMASTER.Build_BUILDNAME
2010-06-14 15_21_56_Any CPU_Debug\In\PROJECT\data.coverage'因为它正由另一个进程使用。


< p style ="background:white"> 发布失败或取消。


 


使用构建服务器上的ProcessExplorer,我发现该文件由VSPerfMon.exe保存 - 调用此可执行文件来计算代码覆盖率。它是由
团队构建开始的,并且应该生成覆盖信息并且关闭。我的禁用值和挂起似乎很困惑。如果我终止该过程,则构建能够继续,甚至生成Release config的覆盖结果。


感谢任何帮助。


 


谢谢


Elena


 


解决方案

我不确定这是什么,但这里有一些猜测:



  • 确保符号CONTRACTS_FULL未在您的配置中定义,以保证所有与合同无关的内容不会发送到您的二进制文件中。


    无需手动定义此符号,因为我们的构建脚本负责每当你启用我们的工具时。
  • 确保你的代码中没有使用Requires< Exception>(...)版本。根据用户手册中的指导原则,你不能使用它方法和不使用重写器。

它也可能与代码合同无关。


 


For team build problem troubleshooting  I disabled "Perfmon runtime contract checking" option in the couple of projects - my team build hangs  now right after UnitTests finish running for Debug config:

Results file:  D:\TfsBuilds\102\PROJECT\UnitTestsAndStaticAnalysis\TestResults\BUILDMASTER.Build_BUILDNAME 2010-06-14 15_21_56_Any CPU_Debug.trx

Test Settings: Local Test Run

Test Run Error.

Waiting to publish...

Publishing results of test run BUILDMASTER.Build@BUILDNAME 2010-06-14 15:21:56_Any CPU_Debug to http://tfs:8080/PROJECTCOLLECTION...

.....................The process cannot access the file 'D:\TfsBuilds\102\PROJECT\UnitTestsAndStaticAnalysis\TestResults\ BUILDMASTER.Build_BUILDNAME 2010-06-14 15_21_56_Any CPU_Debug\In\PROJECT\data.coverage' because it is being used by another process.

Publish failed or canceled.

 

With ProcessExplorer on build server I found that file is held by VSPerfMon.exe - this executable is called to calculate code coverage. It's started by team build and supposed to generate coverage information and go down. It seems confused by my disabled value and hanging. If I kill the process the build is able to continue and even generate the coverage results for Release config.

Any help is appreciated.

 

Thanks

Elena

 

解决方案

Hi, I'm not sure what this could be, but here are some guesses:

  • Make sure that the symbol CONTRACTS_FULL is NOT defined in your configuration to guarantee that all the contract related stuff is not emitted into your binary.
    There's no need to ever define this symbol manually, as our build scripts take care of that whenever you enable our tools.
  • Make sure you dont use the Requires<Exception>(...) version in your code. As per guidelines in the user manual, you cannot use that method and NOT use the rewriter.

It could also be unrelated to code contracts.

 


这篇关于禁用“执行运行时合同检查”对于项目挂起TFS Build(2010)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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