title: Running xunit.net tests in VSTS
body: <p>I have an issue running <code>xunit.net</code> tests in <code>VSTS</code>. When running the Build plan, the <code>Test assemblies</code> step produces the following log:</p>
  
  <blockquote>
    <p>2017-03-21T12:11:39.3302859Z ##[section]Starting: Test Assemblies<br>
    2017-03-21T12:11:39.3382932Z ==============================================================================<br>
    2017-03-21T12:11:39.3382932Z Task         : Visual Studio Test<br>
    2017-03-21T12:11:39.3382932Z Description  : Run tests with Visual Studio test runner<br>
    2017-03-21T12:11:39.3382932Z Version      : 1.0.84<br>
    2017-03-21T12:11:39.3382932Z Author       : Microsoft Corporation<br>
    2017-03-21T12:11:39.3382932Z Help         : <a href="https://go.microsoft.com/fwlink/?LinkId=624539" rel="noreferrer">More Information</a><br>
    2017-03-21T12:11:39.3382932Z ==============================================================================<br>
    2017-03-21T12:11:39.3493151Z Preparing task execution handler.<br>
    2017-03-21T12:11:44.9245238Z Executing the powershell script: D:\a_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.84\VSTest.ps1<br>
    2017-03-21T12:11:46.6530959Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'<br>
    2017-03-21T12:11:46.6530959Z<br>
    2017-03-21T12:11:46.6530959Z<br>
    2017-03-21T12:11:46.6810971Z Does not exist.<br>
    2017-03-21T12:11:46.6820975Z<br>
    2017-03-21T12:11:46.6820975Z<br>
    2017-03-21T12:11:46.8520939Z Working folder: D:\a\1\s<br>
    2017-03-21T12:11:46.8520939Z Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe   "D:\a\1\s\Common.Tests\bin\Release\MyClassLibrary.Tests.dll"  /Settings:"C:\Users\buildguest\AppData\Local\Temp\tmp89AE.tmp" /EnableCodeCoverage /logger:trx /TestAdapterPath:"D:\a\1\s"<br>
    2017-03-21T12:11:47.2730887Z Microsoft (R) Test Execution Command Line Tool Version 14.0.25420.1<br>
    2017-03-21T12:11:47.2740881Z Copyright (c) Microsoft Corporation.  All rights reserved.<br>
    2017-03-21T12:11:47.2740881Z<br>
    2017-03-21T12:11:47.7430814Z Starting test execution, please wait...<br>
    2017-03-21T12:12:01.0768912Z Warning: [xUnit.net 00:00:01.1926376] Skipping: MyClassLibrary.Tests (Could not find any of the following assemblies: xunit.execution.desktop.dll)<br>
    2017-03-21T12:12:01.0768912Z<br>
    2017-03-21T12:12:01.1458970Z Warning: No test is available in D:\a\1\s\Common.Tests\bin\Release\MyClassLibrary.Tests.dll. Make sure that installed test discoverers &amp; executors, platform &amp; framework version settings are appropriate and try again.  </p>
  </blockquote>
  
  <p>The <code>packages.config</code> file for this project is this:</p>
  
  <pre>
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;packages&gt;
    ...
    &lt;package id=&quot;xunit&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.abstractions&quot; version=&quot;2.0.1&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.assert&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.core&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.extensibility.core&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.extensibility.execution&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.runner.msbuild&quot; version=&quot;2.1.0&quot; targetFramework=&quot;net45&quot; /&gt;
    &lt;package id=&quot;xunit.runner.visualstudio&quot; version=&quot;2.2.0&quot; targetFramework=&quot;net45&quot; developmentDependency=&quot;true&quot; /&gt;
  &lt;/packages&gt;
  </pre>
  
  <p>The values used in the <code>Test assemblies</code> build step:</p>
  
  <p><strong>Execution options</strong></p>
  
  <p>Test assembly: <code>**\*Tests.dll;-:**\obj\**</code><br>
  Code coverage enabled: <code>true</code></p>
  
  <p><strong>Advanced Execution options</strong></p>
  
  <p>VSTest: <code>Version</code><br>
  VSTest version: <code>Latest</code></p>
  
  <p>Path to custom adapters is empty, but the tooltip states <code>Nuget restored adapters are automatically searched for.</code></p>
  
  <p><strong>Reporting options</strong></p>
  
  <p>Platform: <code>$(BuildPlatform)</code><br>
  Configuration: <code>$(BuildConfiguration)</code></p>
  
  <p>So it seems (to me) that it can find the proper file (MyClassLibrary.Tests.dll), but doesn't pick up the test methods (which are marked as <code>[Fact]</code> or <code>[Theory</code>]).</p>
  
  <p>Anybody has an idea what I do wrong?</p>
  
  <p><strong>update</strong></p>
  
  <p>All projects in the solution are <code>.NET 4.5</code></p>