title: running xunit tests included in a .NET Standard 1.6 library
body: <p>I just created a netstandard library in Visual Studio 2017 and added references to <code>xunit</code> and <code>xunit.runner.visualstudio</code>, but the VS Test Explorer and Resharper 2017 EAP 3 are not recognizing any tests. I've seen:  <a href="https://stackoverflow.com/questions/41350323/unit-testing-a-net-standard-1-6-library">Unit testing a .NET Standard 1.6 library</a> but project.json is gone and csproj is back in place. </p>
  
  <p>What do I have to do, to be able to run the unit tests included in a netstandard library?</p>
  
  <p><strong>Library.csproj</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netstandard1.6&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="xunit" Version="2.2.0" /&gt;
      &lt;PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p><strong>Test.cs</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace ClassLibrary2
  {
      public class Class1
      {
          [Fact]
          public void RescharperShouldRunTest()
          {
              Assert.True(true);
          }
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/DGuBI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DGuBI.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit</strong></p>
  
  <p>Thanks to the answers I made some progress.</p>
  
  <p>Adding </p>
  
  <pre><code>&lt;PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /&gt;  
  &lt;!-- ... and ...  --&gt; 
  &lt;ItemGroup&gt;
      &lt;Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>did have no impact. Only if I change the <code>TargetFramework</code> to <code>netcoreapp1.1</code> VS discovered the test and could run them. With <code>netstandard1.6</code> the Test Explorer remains empty. But I don't want a netcore app. I want a .NET standard library.</p>