How do i solve vstest error "The test source file "C:\Windows\MyTestProject.dll" provided was not found

266 Views Asked by At
echo Setting path 
SET PATH=%PATH%;D:\My-Tests-Folder\TestPlatform\tools\net462\Common7\IDE\Extensions\TestPlatform
cd "D:\My-Tests-Folder\MSTest"
start cmd /k vstest.console.exe MyTestProject.dll /testcasefilter:TestCategory=Category123

I have the above commands in a batch file that i use to run my MSTest unit tests created in a Visual Studio 2019 MS Test project.

I have copied all the dll files of my test project into the folder D:\My-Tests-Folder\MSTest

When i execute the batch file on my local machine, all the tests run successfully.

Problem: When i copy the same folder to the D drive of a remote machine and i try to execute the batch file from there, i get the following error :

The test source file "C:\Windows\MyTestProject.dll" provided was not found.

MyTestProject.dll is located in folder location D:\My-Tests-Folder\MSTest but obviously not under C:\Windows.

Does any one know what i'm doing wrong?

When i make a remote desktop connection to the remote computer and execute the batch file from there, it runs successfully, so it only fails when i access the remote folder from my local machine and try to run the batch file.

0

There are 0 best solutions below