5

I am supposed to do an offline installation of vstest.console.exe in the folder path as follows: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow

I have tried using offline packages such as vs_testagent.exe and vs_testcontroller.exe according to the following link: https://learn.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio. However, these packages do not contain vstest.console.exe.

I am also unable to do a full installation of VS2017 due to space issues. Do anyone have any suggestions? Thanks.

g t
  • 7,287
  • 7
  • 50
  • 85
Gluon
  • 81
  • 1
  • 1
  • 9
  • It's available when install Visual Studio Build Tools' [component Microsoft.VisualStudio.Component.TestTools.BuildTools](https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022) – mems Mar 11 '22 at 17:59

4 Answers4

7

Download the nuget package: Microsoft.TestPlatform, rename it a zip file. Open the zip file, you will find all you need from this folder: .\tools\net451\Common7\IDE\Extensions\TestPlatform, including vstest.console.exe, testhost.**.exe, QTAgent.exe, datacollector.exe.

If you added the nuget package to project, it just downloads the package to packages folder and won't complie to bin, so you have to add a Post-Build event to copy files to bin folder from the packages folder.

Dongdong
  • 2,208
  • 19
  • 28
2

You are looking for "Build Tools for Visual Studio" (Microsoft login required). It will give you an installer "vs_BuildTools.exe", which will install by default the build tools in:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools

(by default)

Two versions of vstest console were installed when I ran it:

  1. ...\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
  2. ...\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

I do not know why, nor how they are different. I use the first one.

R. Schreurs
  • 8,587
  • 5
  • 43
  • 62
  • The first one is Test Platform v1 (TPv1), whereas the second is Test Platform v2 (TPv2). See https://github.com/Microsoft/vstest-docs/blob/master/docs/contribute.md#running-tests-with-tpv2-using-test-explorer (permalink: https://github.com/microsoft/vstest-docs/blob/206f9377959ca17bf12ba24150bab17bcec8a41a/docs/contribute.md#running-tests-with-tpv2-using-test-explorer) – Chris Yungmann May 16 '20 at 19:41
  • The web-installer of `Build Tools for Visual Studio 2022` doesn't install `vstest.console.exe` or anything similar – AntonK Dec 13 '22 at 15:28
1

Download the Visual Studio Build Tools installer from https://my.visualstudio.com/Downloads?q=build%20tools%20for%20visual%20studio

Run the installer, click the tab Individual components and select Testing tool core features - Build Tools

enter image description here

After installation the vstest.console.exe is located in folder

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow

Englund0110
  • 514
  • 2
  • 5
  • 23
0

I used the chocolatey package visualstudio2019testagent to install VS 2019 Test Agent.

Not sure if this would help someone in the future.

Harshal
  • 105
  • 4