It might be a simple question, but it seems I can't figure out how to combine NUnit and a .NET Core project in Rider.
It is nowhere in the templates and if I just create a simple class library and reference a NuGet package I guess that is not the option. None of the usual NUnit items are recognized even if I reference using NUnit.Framework just like it is referenced in the usual .NET.
Either I don't know something or it is not yet supported. Has anyone had any experience in using NUnit with .NET Core in JetBrains' Rider IDE?
I know there is MSTest and xUnit available, but I am really used to NUnit, so I really want to make sure there isn't any workaround.
So here is how I did it thanks to the article .NET Standard and .NET Core unit tests not discovered with new .csproj format in Visual Studio 2017 .
Create an empty .NET Core Class Library
Unload the project
Edit the .csproj file. For some reason it points to target netstandard2.0
. Set it to point to netcoreapp2.0
.
Download NuGet Packages
Reference your the .NET Core project you want to test in the dependencies
Start testing using NUnit.Framework;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With