开发者

Why don't I get code coverage results for C++/CLI project in Visual Studio 2010?

开发者 https://www.devze.com 2022-12-31 04:22 出处:网络
I\'ve recently up开发者_Go百科grade my solution to Visual Studio 2010. I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI.

I've recently up开发者_Go百科grade my solution to Visual Studio 2010.

I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI.

I get coverage for the C# projects but not for the C++/CLI project.

I did get for all of them in Visual Studio 2008.

I've configured the assemblies using testrunconfig -> Data and Diagnostics -> Code Coverage -> Configure.

Why don't I get code coverage result for the C++/CLI project?


I've found out what was wrong.

It appears that the upgrade from Visual Studio 2008 to Visual Studio 2010 removed the profile option (/PROFILE).

What was needed to be done was to go to

Project Properties -> Configuration Properties -> Linker -> Advanced -> Profile

and change this settings to Yes (/PROFILE).

Now I get code coverage for the C++/CLI project.

0

精彩评论

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

关注公众号