title: .NET Core 2.0 xUnit tests not discovered in VSTS
body: <p>Im trying to set up VSTS Continuous Integration with a .NET Core 2.0 project and xUnit. </p>
  
  <p>I've got the xunit.runner.visualstudio NuGet package installed, and everything works fine in Visual Studio.</p>
  
  <p>VSTS cant find any tests to run though.</p>
  
  <p>What I could find so far is <a href="https://blogs.perficient.com/microsoft/2016/08/unit-test-with-net-core-and-vsts/" rel="nofollow noreferrer">this article</a>, which describes how to set it up with .NET Core 1.0, by using project.json. Unfortunately that wont work, because project.json is gone in .NET Core 2.0.</p>
  
  <p>Any suggestions?</p>
  
  <p>VSTS output:</p>
  
  <blockquote>
    <p>2017-11-08T20:00:30.4824989Z ##[section]Starting: VsTest -
    testAssemblies 2017-11-08T20:00:30.4834988Z
    ============================================================================== 2017-11-08T20:00:30.4834988Z Task         : Visual Studio Test
    2017-11-08T20:00:30.4834988Z Description  : Run tests with Visual
    Studio test runner 2017-11-08T20:00:30.4834988Z Version      : 2.2.3
    2017-11-08T20:00:30.4834988Z Author       : Microsoft Corporation
    2017-11-08T20:00:30.4834988Z Help         : <a href="https://go.microsoft.com/fwlink/?LinkId=835764" rel="nofollow noreferrer">More
    Information</a>
    2017-11-08T20:00:30.4834988Z
    ============================================================================== 2017-11-08T20:00:31.2064989Z Run the tests locally using
    vstest.console.exe 2017-11-08T20:00:31.2064989Z
    ======================================================== 2017-11-08T20:00:31.2074983Z Test selector : Test assemblies
    2017-11-08T20:00:31.2084986Z Test assemblies :
    <strong>\release*test*.dll,</strong>\release\netcoreapp2.0*Unit*.dll,-:<strong>\xunit.runner.visualstudio.testadapter.dll,!</strong>\obj**
    2017-11-08T20:00:31.2084986Z Test filter criteria : null
    2017-11-08T20:00:31.2094992Z Search folder : d:\a\1\s
    2017-11-08T20:00:31.2094992Z Run settings file : d:\a\1\s
    2017-11-08T20:00:31.2094992Z Run in parallel : false
    2017-11-08T20:00:31.2115263Z Run in isolation : false
    2017-11-08T20:00:31.2184982Z Path to custom adapters : null
    2017-11-08T20:00:31.2194992Z Other console options : null
    2017-11-08T20:00:31.2194992Z Code coverage enabled : false
    2017-11-08T20:00:31.2205509Z VisualStudio version selected for test
    execution : latest 2017-11-08T20:00:32.3430734Z
    ======================================================== 2017-11-08T20:00:38.4660600Z [command]"C:\Program Files
    (x86)\Microsoft Visual
    Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
    @d:\a_temp\7a0ab851-c4bf-11e7-9264-0bc93cd5677b.txt
    2017-11-08T20:00:38.6420650Z Microsoft (R) Test Execution Command Line
    Tool Version 15.0.26929.2 2017-11-08T20:00:38.6420650Z Copyright (c)
    Microsoft Corporation.  All rights reserved.
    2017-11-08T20:00:38.6420650Z  2017-11-08T20:00:38.6420650Z
    vstest.console.exe  2017-11-08T20:00:38.6430604Z
    "d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\MyTestProject.Business.Unit.dll"
    2017-11-08T20:00:38.6430604Z
    "d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.reporters.netcoreapp10.dll"
    2017-11-08T20:00:38.6430604Z
    "d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.utility.netcoreapp10.dll"
    2017-11-08T20:00:38.6430604Z
    "d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll"
    2017-11-08T20:00:38.6430604Z /logger:"trx"
    2017-11-08T20:00:38.6430604Z /TestAdapterPath:"d:\a\1\s"
    2017-11-08T20:00:39.2010599Z Starting test execution, please wait...
    2017-11-08T20:00:39.7672139Z Warning: No test is available in
    d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\MyTestProject.Business.Unit.dll
    d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.reporters.netcoreapp10.dll
    d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.utility.netcoreapp10.dll
    d:\a\1\s\Salgsapp\MyTestProject.Business.Unit\bin\Release\netcoreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll.
    Make sure that installed test discoverers &amp; executors, platform &amp;
    framework version settings are appropriate and try again.
    2017-11-08T20:00:39.7682139Z  2017-11-08T20:00:39.7812142Z 
    2017-11-08T20:00:40.6140742Z Information: Additionally, you can try
    specifying '/UseVsixExtensions' command if the test discoverer &amp;
    executor is installed on the machine as vsix extensions and your
    installation supports vsix extensions. Example: vstest.console.exe
    myTests.dll /UseVsixExtensions:true 2017-11-08T20:00:40.6140742Z 
    2017-11-08T20:00:43.0551327Z ##[warning]No results found to publish.
    2017-11-08T20:00:43.0711309Z ##[section]Finishing: VsTest -
    testAssemblies</p>
  </blockquote>
  
  <p>Project definition:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
  
      &lt;IsPackable&gt;false&lt;/IsPackable&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" /&gt;
      &lt;PackageReference Include="Moq"&gt;
        &lt;Version&gt;4.7.142&lt;/Version&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /&gt;
      &lt;PackageReference Include="MSTest.TestFramework" Version="1.1.18" /&gt;
      &lt;PackageReference Include="xunit"&gt;
        &lt;Version&gt;2.3.1&lt;/Version&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include="xunit.runner.visualstudio"&gt;
        &lt;Version&gt;2.3.1&lt;/Version&gt;
      &lt;/PackageReference&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include="..\MyTestProject.Business\MyTestProject.Business.csproj" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>Build configuration:</p>
  
  <p><a href="https://i.stack.imgur.com/Ntrko.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ntrko.png" alt="enter image description here"></a></p>