开发者

PartCover 4.0 Only Reports NUnit Libraries

开发者 https://www.devze.com 2023-01-26 03:23 出处:网络
I\'m using PartCover 4.0 (from the sourceforge page, latest dev build) with NUnit 2.5.8 on Windows 7 (x64). PartCover runs ok (using the -x86.exe), but it only shows me coverage for various NUnit pack

I'm using PartCover 4.0 (from the sourceforge page, latest dev build) with NUnit 2.5.8 on Windows 7 (x64). PartCover runs ok (using the -x86.exe), but it only shows me coverage for various NUnit packages -- not my own source-code.

I originally didn't use CorFlags.exe since I didn't get the COM error; I tried it anyways, and it didn't make any difference.

I've looked at all the other questions on Stack Overflow, and none seem to apply; I'm using PartCover 4.0, 开发者_运维百科there are no spaces in any of my names, my coverage rule is the most broad (+[*]*), and I've run CorFlags.exe.

What am I missing?


I had this problem yesterday and, searching for the answer, came across this unanswered question. Now that I've found the answer, at least for me, I thought I'd come and leave help for the next person to do the same.

It turned out to be as simple as NUnit-console.exe being configured to support .NET 2.0 rather than .NET 4.0. You can see this in a "Runtime Environment" section of the PartCover output.

In each of the config files in NUnit's bin\net-2.0 folder, add this section directly below the configuration tag

<startup>
  <requiredRuntime version="v4.0.20506" />
</startup>
0

精彩评论

暂无评论...
验证码 换一张
取 消