Bad Image Exception on Azure Service Fabric Unit Tests

I just experienced this System.BadImageFormatException. Could not load file or assembly ‘System.Fabric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. An attempt was made to load a program with an incorrect format. The unit test shall test a Azure Service Bus connection. Yes, sure it is a unit test and the …