I am trying to run an all included exe (created using Costura ) on a windows VM. As per an answer in this SO question , I have installed test agent and build tools and trying to run exe through this command
C:\Users\..\Desktop>"C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" MyExeName.exe /Tests: MyTestName
on VM , I start the agent and give above command but I am receiving error No test is available in C:\Users\..\Desktop\MyExeName.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
The exe runs fine on local machine using same command and start tests. On local I have VS2019 and all the code. On VM , I can not have VS and code base as a requirement.
EDIT:
I noticed (through ILSpy) that in dot exe under references, there is no reference to this Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
, however the dll
is present in resources.