System.BadImageFormatException related to loading Nvidia.TextureTools.dll when run MonoGame unit tests from sources.

When run tests some of them fail because of System.BadImageFormatException.

e.g var dxtCompressor = new Compressor();, file: DxtBitmapContent throws System.BadImageFormatException - probably because Compressor is located in Nvidia.TextureTools.dll assembly.

I tried to run tests in x86, from VS2015 and from NUnit console - still the same issue.

Any idea how to fix my tests?

the problem gone when applied change in Visual Studio as following:

test -> test settings -> default processor architecture -> x64

The content pipeline is built for x64 only, and because the unit tests run the content pipeline they need to be run in x64 as well.