Unit test coverage using dotCover command line tool(JetBrains) - Is it possible to run this tool with x64 dll tests?


Unit test coverage using dotCover command line tool(JetBrains) - Is it possible to run this tool with x64 dll tests?



I am using dotCover command line tool(JetBrains) https://www.jetbrains.com/dotcover/download/#section=commandline



I was reading this documentation
https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html



I have a logic dll - x64 compiled.
I have a tests dll (AppTests Test project) -x64 compiled
I was creating coverage.xml on my solution Items folder with the parameters below


<AnalyseParams>
<TargetExecutable>C:Program Files (x86)Microsoft Visual Studio12.0Common7IDEMSTest.exe</TargetExecutable>
<TargetArguments>D:ProjectsTheApplicationbinDebugAppTests.dll</TargetArguments>
<Output>AppCoverageReport.html</Output>
<ReportType>html</ReportType>
</AnalyseParams>



From the cmd I am typing "dotcover analyse coverage.xml"



I am getting the flowing Error:
"If you build your test project assembly as a 64 bit assembly, it cannot be loaded. When you build your test project assembly, select "Any CPU" for the platform. To run your tests in 64 bit mode on a 64 bit processor, you must change your test settings in the Hosts tab to run your tests in a 32 bit process"



I can't build my logic.dll and AppTests.dll to "any cpu".



I read this post:
How do I get unit tests to run on a x64 platform



But in my case, I am running the tests from dot cover command line tool and not from the visual studio UI.



What can I do? Is there any other option?



Thanks.




1 Answer
1



I was getting answer from Resharper support and it solve my issue, so I am sharing it.


<AnalyseParams>
<TargetExecutable>C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDECommonExtensionsMicrosoftTestWindowvstest.console.exe</TargetExecutable>
<TargetArguments>D:ProjectsTheApplicationbinDebugAppTests.dll /Settings:"<your path>runsetting.xml"</TargetArguments>
<Output>AppCoverageReport.html</Output>
<ReportType>html</ReportType>
</AnalyseParams>






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

List of Kim Possible characters

Audio Livestreaming with Python & Flask

NSwag: Generate C# Client from multiple Versions of an API