# Can't run vstest.console.exe action specifying the test adapter

**URL:** https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744
**Category:** Bugs
**Created:** [March 17, 2020, 10:43am UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744 "2020-03-17T10:43:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![L4ZZA](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/l4zza/32/1816_2.png) [@L4ZZA](https://www.finalbuilder.com/forums/u/L4ZZA)
#### Post date: [March 17, 2020, 10:43am UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744/1 "2020-03-17T10:43:41Z")

</div>

I’m trying to run a google test created from visual studio so that it filters by a given trait [i.e. \*UnitTest\*]  
We use Visual studio 2019 and FinalBuilder 8 to run our build routine but since the update we can’t discover c++ tests properly nor filter them.

here are some logs of different runs with different parameters:

#### VsTest.Console - v2019

This option doesn’t run any test…

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/4/4282a3f9842e45f1af4828066c82a59112a37287.png)

```
Run VSTest.Console ["C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\google_test_example_nuget.exe"]
    Status: 
      Date: 17/03/2020
      Time: 10:39:53:209
       End: 10:39:54:828
  Duration: 00:00:01:619

Action Messages:
Checking for TFS environment...
Executing external process: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Starting Directory: C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\
Parameters: C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\google_test_example_nuget.exe /platform:"x64" /framework:Framework45 /logger:trx
Output from C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
No test is available in C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\google_test_example_nuget.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Results File: C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\TestResults\Pietro_DEVINT-PC_2020-03-17_10_39_54.trx

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example /TestAdapterPath:<pathToCustomAdapters>.

```

#### VsTest.Console - v2019 - /usevsixextensions:true

This option just crashes

```
Run VSTest.Console ["C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\google_test_example_nuget.exe"]
    Status: 
      Date: 17/03/2020
      Time: 10:25:36:330
       End: 10:25:36:976
  Duration: 00:00:00:646

Action Messages:
Checking for TFS environment...
Executing external process: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Starting Directory: C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\
Parameters: C:\dev\investigations\google_test_example_nuget\x64-Debug\bin\google_test_example_nuget.exe /usevsixextensions:true /platform:"x64" /framework:Framework45 /logger:trx
Output from C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation. All rights reserved.

/UseVsixExtensions is getting deprecated. Please use /TestAdapterPath instead.
Failed to find the list of installed unit test extensions. Reason: System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.VSExtensionManager.GetTestExtensionsInternal(String extensionType)
   at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.VSExtensionManager.GetUnitTestExtensions()
Action Failed
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe returned : 1

```

### Proposed solution

Add the option to specify the `/TestAdapterPath:<pathToCustomAdapters>` parameter (include instructions to which exact folder it needs to be pointing at please) since none of the current options seem to cater for the latest VisualStudio

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 17, 2020, 11:55pm UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744/2 "2020-03-17T23:55:52Z")

</div>

We have added the TestAdapterPath setting :

[https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_2811.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2811.exe)

I believe the common scenario is to include the test adapter in the project as a nuget package and provide a relative path to where the nuget package is extracted to.

---

<div class="post-metadata">

### Author: ![L4ZZA](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/l4zza/32/1816_2.png) [@L4ZZA](https://www.finalbuilder.com/forums/u/L4ZZA)
#### Post date: [March 31, 2020, 8:24am UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744/3 "2020-03-31T08:24:39Z")

</div>

This version doesn’t seem to be available as a official release tho… the latest available is **FB800\_2797**.exe  
[https://www.finalbuilder.com/downloads/finalbuilder/finalbuilder-8-version-history](https://www.finalbuilder.com/downloads/finalbuilder/finalbuilder-8-version-history)

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 31, 2020, 9:20am UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744/4 "2020-03-31T09:20:35Z")

</div>

It’s a bug fix build, the same as the release build but with the one change. We’ll be releasing an official update next week.

---

<div class="post-metadata">

### Author: ![L4ZZA](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/l4zza/32/1816_2.png) [@L4ZZA](https://www.finalbuilder.com/forums/u/L4ZZA)
#### Post date: [March 31, 2020, 9:28am UTC](https://www.finalbuilder.com/forums/t/cant-run-vstest-console-exe-action-specifying-the-test-adapter/6744/5 "2020-03-31T09:28:19Z")

</div>

Sweet, I’ll wait for that then so that I can tell the whole team to download it
