NUnit 3.8 Alpha 1 VS Adapter
Pre-releaseThis is the first release of the adapter that supports .NET Core and .NET Standard projects in Visual Studio 2017. This is an alpha release to enable NUnit users to begin moving their .NET Core projects from the project.json
format to the new csproj
format.
It is recommended to install the adapter from NuGet if you are testing .NET Core or .NET Standard projects. The VSIX adapter does not, and will not, support .NET Core because VSIX packages cannot target multiple platforms.
Adding this adapter and Microsoft.NET.Test.Sdk
version 15.0.0
to your NUnit test projects will also enable the dotnet test
command for .NET Core projects.
Any tests using the new style CSPROJ format, either .NET Core or .NET 4.x, need to add a PackageReference
to the NuGet package Microsoft.NET.Test.Sdk
. Your test assemblies must also be .NET Core, not .NET Standard, I don't know why.
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
</ItemGroup>
.NET Core test can be run on the command line with dotnet test
, for example,
> dotnet test .\test\NetCore10Tests\NetCore10Tests.csproj
Also, note that Code Coverage and Live Unit Testing does not work with .NET Core yet. They will be supported in a future version of Visual Studio, likely 15.2.