title: VSTS task error when run integration tests in .Net Core 2.1
body: <p>I am running API e2e tests in VSTS 2017 CD tasks and getting below error at the task (vsTest - End2End Tests)</p>
  
  <pre><code>Unable to find d:\a\r1\a\Project\e2e\bin\Release\netcoreapp2.1\testhost.dll. Please publish your test project and retry.
  Unable to find d:\a\r1\a\Project\e2e\obj\Release\netcoreapp2.1\Project.EndToEnd.Integration.Test.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk". 
  </code></pre>
  
  <p>I have below nuget packages in my e2e prject.</p>
  
  <pre><code>&lt;PackageReference Include="FluentAssertions" Version="5.6.0" /&gt;
  &lt;PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /&gt;
  &lt;PackageReference Include="Microsoft.TestPlatform.TestHost" Version="15.9.0" /&gt;
  &lt;PackageReference Include="Newtonsoft.Json" Version="12.0.1" /&gt;
  &lt;PackageReference Include="TestStack.BDDfy" Version="4.3.2" /&gt;
  &lt;PackageReference Include="TestStack.BDDfy.Xunit" Version="1.0.0" /&gt;
  &lt;PackageReference Include="xunit" Version="2.4.1" /&gt;
  &lt;PackageReference Include="xunit.core" Version="2.4.1" /&gt;
  &lt;PackageReference Include="xunit.extensibility.core" Version="2.4.1" /&gt;
  &lt;PackageReference Include="xunit.extensibility.execution" Version="2.4.1" /&gt;
  &lt;PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"&gt;
  </code></pre>
  
  <p>My project target framework is <code>.Net Core 2.1</code></p>
  
  <p>As per <a href="https://stackoverflow.com/questions/42938879/cant-get-xunit-tests-to-run-with-net-core">this</a> I believe everything in place. Not sure what is missing?</p>
  
  <p>VSTS Task</p>
  
  <p><a href="https://i.stack.imgur.com/fPhiy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fPhiy.png" alt="enter image description here"></a></p>
  
  <p><strong>Build.yaml</strong> (section)</p>
  
  <pre><code>- task: CopyFiles@2
        displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
        inputs: 
          contents: "D:/a/1/s/src/xxx.EndToEnd.Integration.Tests/**"
          targetFolder: $(Build.ArtifactStagingDirectory)
  
  - task: DotNetCoreCLI@2
       displayName: "dotnet e2e tests"
       inputs: 
         command: publish
         projects: $(Build.ArtifactStagingDirectory)/src/xxx.EndToEnd.Integration.Tests/xxx.EndToEnd.Integration.Tests.csproj
         arguments : --no-build
  
      - task: PublishBuildArtifacts@1
        displayName: "Publish End-to-End Tests"
        inputs: 
          artifactName: e2e
          artifactType: container
          pathToPublish: $(Build.ArtifactStagingDirectory)/src/xxx.EndToEnd.Integration.Tests
  </code></pre>