v3.3.0.6
Hi I know the support is not fully implemented but I noticed it works so nice for xunit/MSTest I thought there is a chance on getting it to work with NUnit as well?
What I did in latest VS2017 RC.4+26206 was:
1) create a new dotnetcore console project
2) Install package NUnit and NUnitLite 3.6.0
3) In Program.cs use below code (taken from
https://github.com/nunit...s/wiki/NUnitLite-Runner ):
Code:
class Program
{
static void Main(string[] args)
{
new AutoRun(Assembly.GetEntryAssembly()).Execute(args);
//Console.WriteLine("Hello World!");
}
}
4) Add a TestFixture] class with a test.
5) Build in vstudio
6) run dll via dotnet <consoleApp>.dll
This works fine and my test is executed.
NCrunch however cannot build when I add the NUnit dependency (NUnitLite works fine) due to error below
Code:
NCrunch: This project was built on server '(local)'
NCrunch: The tests in this project were discovered on server '(local)'
NCrunch: This project was built on server '(local)'
NCrunch: The tests in this project were discovered on server '(local)'
An error occurred while analysing this project after it was built: System.ArgumentException:
A BadImageFormatException has been thrown while parsing the signature. This is likely due to
lack of a generic context. Ensure genericTypeArguments and genericMethodArguments are provided
and contain enough context. ---> System.BadImageFormatException: Could not load file or
assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
or one of its dependencies. Reference assemblies should not be loaded for execution. They can
only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) --->
System.BadImageFormatException: Could not load file or assembly
'file:///C:\Users\myUser\.nuget\packages\system.runtime\4.1.0\ref\netstandard1.5\System.Runtime.dll'
or one of its dependencies. Reference assemblies should not be loaded for execution. They can only
be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) --->
Is there something I can do about it?
Thanks.