64 位上的 NCover - CorFlags 修复 - corflags:错误 CF008:指定的文件没有有效的托管标头
我正在尝试应用修复程序,以允许 NCover v1.5.5 通过我的 TeamCity 持续集成服务器在 Windows Server 2008 X64 上运行,如本博客所述:
http://abdullin.com/journal/2008/6/6/how -to-run-free-ncover-on-a-64-bit-machine.html
这是我的日志:
[09:47:04]: run-unit-tests:
[09:47:04]: [echo] Running NCover: tools\ncover\NCover.Console.exe with workingdir='build\Debug\UnitTests'
[09:47:04]: [exec] NCover.Console v1.5.5 - Code Coverage Analysis for .NET - http://ncover.org
[09:47:04]: [exec] Copyright (c) 2004-2005 Peter Waldschmidt
[09:47:04]: [exec]
[09:47:04]: [exec]
[09:47:04]: [exec] Command: ..\..\..\tools\nunit\nunit-console.exe
[09:47:04]: [exec] Command Args: "UnitTests.dll" "/xml:..\..\test-reports\UnitTests.xml" "/nologo"
[09:47:04]: [exec] Working Directory: .
[09:47:04]: [exec] Assemblies:
[09:47:04]: [exec] Coverage Xml: D:\TeamCity\buildAgent\work\a65ff8d0771db303\build\test-reports\Coverage.xml
[09:47:04]: [exec] Coverage Log: Coverage.Log
[09:47:04]: [exec]
[09:47:07]: [exec] Waiting for profiled application to connect.......N.N.N.N..N.......
[09:47:07]: [exec] Tests run: 11, Failures: 0, Not run: 5, Time: 1.096 seconds
[09:47:07]: [exec]
[09:47:07]: [exec]
[09:48:04]: [exec] Connected
[09:48:04]: [exec] **Profiled process terminated. Profiler connection not established.**
[09:48:04]: BUILD FAILED
所以我尝试应用 CorFlags 技巧来使其工作,但我收到错误:
C:\Program Files (x86)\Microsoft.NET\SDK\v2.0\Bin>CorFlags.exe D:\TeamCity\build Agent\work\a65ff8d0771db303\tools\NCover\NCover.exe /32BIT+
Microsoft (R) .NET Framework CorFlags 转换工具。 版本2.0.50727.42 版权所有 (c) Microsoft Corporation。 版权所有。
corflags:错误CF008:指定的文件没有有效的托管标头
有什么想法吗? 帮助!
I'm trying to apply a fix to allow NCover v1.5.5 to run on Windows Server 2008 X64 via my TeamCity Continuous Integration server as outlined on this blog:
http://abdullin.com/journal/2008/6/6/how-to-run-free-ncover-on-a-64-bit-machine.html
Here is my log:
[09:47:04]: run-unit-tests:
[09:47:04]: [echo] Running NCover: tools\ncover\NCover.Console.exe with workingdir='build\Debug\UnitTests'
[09:47:04]: [exec] NCover.Console v1.5.5 - Code Coverage Analysis for .NET - http://ncover.org
[09:47:04]: [exec] Copyright (c) 2004-2005 Peter Waldschmidt
[09:47:04]: [exec]
[09:47:04]: [exec]
[09:47:04]: [exec] Command: ..\..\..\tools\nunit\nunit-console.exe
[09:47:04]: [exec] Command Args: "UnitTests.dll" "/xml:..\..\test-reports\UnitTests.xml" "/nologo"
[09:47:04]: [exec] Working Directory: .
[09:47:04]: [exec] Assemblies:
[09:47:04]: [exec] Coverage Xml: D:\TeamCity\buildAgent\work\a65ff8d0771db303\build\test-reports\Coverage.xml
[09:47:04]: [exec] Coverage Log: Coverage.Log
[09:47:04]: [exec]
[09:47:07]: [exec] Waiting for profiled application to connect.......N.N.N.N..N.......
[09:47:07]: [exec] Tests run: 11, Failures: 0, Not run: 5, Time: 1.096 seconds
[09:47:07]: [exec]
[09:47:07]: [exec]
[09:48:04]: [exec] Connected
[09:48:04]: [exec] **Profiled process terminated. Profiler connection not established.**
[09:48:04]: BUILD FAILED
So I'm trying to apply the CorFlags trick to make it work, but I am getting an error:
C:\Program Files (x86)\Microsoft.NET\SDK\v2.0\Bin>CorFlags.exe D:\TeamCity\build
Agent\work\a65ff8d0771db303\tools\NCover\NCover.exe /32BIT+
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
corflags : error CF008 : The specified file does not have a valid managed header
Any ideas?? Help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,我通过升级到较新版本的 NUnit 并将我的 Nover 任务更改为指向 X86 版本来解决了这个问题:
I actually solved this by upgrading to a newer version of NUnit, and changing my NCover task to point to the X86 version: