Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (5.8k points)

I am trying to run our xUnit tests using the xUnit test adapter in Visual Studio Online's Build vNext platform.

As stipulated in this article, we need to provide a custom test adapter path pointing to xunit.runner.visualstudio.testadapter.dll.

But this package is restored by NuGet to a global packages folder, namely C:\Users\{user}\.dnx\packages?

How am I to reference this folder in the build step?

VSO vNext Build Test Step

We are using VS 2015 and DNX projects.


I even tried pointing to the package path DLL directly:


It still did not seem to use the adapter:

Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\a\8ac4a4f6\Root\artifacts\bin\MyProject.UnitTest\release\dnx451\TransitApi.UnitTest.dll"  /TestAdapterPath:C:\Users\buildguest\.dnx\packages\xunit.runner.visualstudio\2.1.0-beta4-build1109\build\_common /UseVsixExtensions:true /logger:trx

Microsoft (R) Test Execution Command Line Tool Version 14.0.23107.0

Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

Warning: No test is available in C:\a\8ac4a4f6\Root\artifacts\bin\MyProject.UnitTest\release\dnx451\TransitApi.UnitTest.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

No results found to publish.

The project.json, if relevant:

"dependencies": {

  "xunit": "2.1.0-beta4-build3109",

  "xunit.runner.dnx": "2.1.0-beta4-build134",

  "xunit.runner.visualstudio": "2.1.0-beta4-build1109"


"commands": {

  "test": "xunit.runner.dnx"


"frameworks": {

  "dnx451": { }


1 Answer

0 votes
by (9.6k points)

Create json file: global.json and add this:


     "packages" : "packages" 


Browse Categories