azure-pipelines-tasks: Cannot specify /UseVsixExtensions:true in Visual Studio Test task version 2.0.17

I was able to specify other console options /UseVsixExtensions:true in version 2.0.13 in order for my .NET core/xUnit tests to be discovered and run. The other console options have been removed from UI. What is recommendation to provide this option through the latest Visual Studio Test task UI?

Here is command line for a VSTS build using version 2.0.13 of VSTest task on 2/25/2017 that was able to discover and run unit tests successfully:

[command]"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" D:\a\1\s\test\BuildTest.Web.App.Tests\project.json /EnableCodeCoverage /UseVsixExtensions:true /logger:trx

(Note the /UseVsixExtensions:true setting).

This is the test project.json file:

{
  "version": "1.0.0-*",

  "testRunner": "xunit",

  "dependencies": {
    "dotnet-test-xunit": "2.2.0-*",
    "BuildTest.Web.App": "1.0.0-*",
    "Microsoft.CodeCoverage": "1.0.2",
    "xunit": "2.2.0-*",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.1.0"
    },
    "Moq": "4.7.0",
    "Microsoft.DotNet.InternalAbstractions": "1.0.500-preview2-1-003177"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

Here is the command line on 3/16/2017 with version 2.0.17 with NO changes to the project files or build tasks:

[command]"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" C:\a\1\s\test\BuildTest.Web.App.Tests\project.json /EnableCodeCoverage /logger:trx

As you can see the /UseVisixExtensions:true is no longer on the command line, resulting in:

Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true

##[warning]No results found to publish.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (8 by maintainers)

Most upvoted comments

@marcwmiller sorry for the trouble. Here are two short term workarounds till we get this fixed

  1. add two cmd line task in ur build definition. copy “c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet\ProjectSystem*.*” $(Build.Repository.LocalPath)

image

and copy Microsoft.VisualStudio.Projectsystem.DotNet.UnitTestAdapter.dll Microsoft.VisualStudio.Projectsystem.DotNet.TestAdapter.dll in working folder $(Build.Repository.LocalPath)

image

and add this in your vstest task in custom adapter path $(Build.Repository.LocalPath) image

  1. use command line vstest.console.exe to run test via usevsixextensions:true and then use publish test results task to publish results.