B
B
Boris the Animal2017-09-21 00:58:22
ASP.NET
Boris the Animal, 2017-09-21 00:58:22

Visual Studio 2017 v15.3.5 does not see xUnit tests in an ASP.NET Core 2.0 project. How to make it see?

I am reading the book "ASP.NET Core MVC with C# Examples for Professionals". I do all the examples from the book. Stuck on tests. The studio does not see the tests and it is generally not entirely clear how to make the whole thing work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris the Animal, 2017-09-21
@Casper-SC

Understood. In general, for Visual Studio 2017 v15.3.5 everything worked for me with the following config:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170914-09" />
    <PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\src\RazorLesson.Model\RazorLesson.Model.csproj" />
  </ItemGroup>

</Project>

https://www.nuget.org/packages/Microsoft.NET.Test....
https://www.nuget.org/packages/xunit/2.3.0-beta5-b...
https://www .nuget.org/packages/xunit.runner.visual...
https://docs.microsoft.com/en-us/dotnet/core/testi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question