GitAction vstest.console.exe not found error in vswhere darenm/Setup-VSTest@v1

Viewed 72

I am trying to add an automated testing tool to my gitaction in github. The git action run on a self hosted runner on which I installed Visual Studio Build tools. However when I try to setup darenm/Setup-VSTest@v1 in my get action I get this error:

C:\actions-runner\^\_tool\vswhere\2.7.1\x64\vswhere.exe -latest -property installationPath
Error: Unable to find VSTest.console.exe

The thing is that the vstest.console.exe is on the server I can find it under : C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow

I tried installing everything in the vs installer and yet still nothing. There is my yml file:

runs-on: [staging]
steps:
  - uses: actions/checkout@v2
  
  - name: setup-msbuild
    uses: microsoft/setup-msbuild@v1.0.3
    
  - name: Setup NuGet.exe for use with actions
    uses: NuGet/setup-nuget@v1.0.5
    
  - name: Setup VSTest.console.exe
    uses: darenm/Setup-VSTest@v1

  - name: restore nuget package for solution
    run: nuget restore CoreSolution.sln        
  
  - name: Build solution
    run: msbuild CoreSolution.sln
  
  - name: Test Services
    run: vstest.console.exe .\CoreSolution\Core.Tests\Debug\Core.Test.DLL
0 Answers
Related