I'm doing unit test of a library using 64 bits libraries (cuda SDK among others).
I'm trying to have a deeper diagnose with cuda-memcheck
, therefore I'm running tests on the command line.
mstest.exe /testcontainer:CubicBSplinesTests.dll /test:RGBSliceDoubleConvert
It fails since it will try to run in 32 bits. I was recommanded to use "Any CPU" but there is no such thing in a c++ project. How can I make the test run in 64 bits in those conditions ?
Unable to load the test container 'CubicBSplinesTests.dll' or one of its dependencies. 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. Error details: Could not load file or assembly 'file:///project_path\x64\Debug\CubicBSplinesTests.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
The right command is:
vstest.console.exe CubicBSplinesTests.dll --tests:RGBSliceDoubleConvert
After adding to path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
mstest.exe
is for .net testing, not native c/c++ testing.