I created a new Service Fabric application using the Stateless Service template. I added a simple class so I can write a unit test for it:
public class FakeClass
{
public void DoStuff()
{
FabricClient client = new FabricClient();
}
}
I create a new class library for unit tests and reference the xUnit and xUnit runner nuget packages. When I try and run the unit tests I get the following error:
Result Message: System.BadImageFormatException : Could not load file or assembly 'XUnitExample.WebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
How can I get xUnit working with Service Fabric so I can write unit tests?