I'm having some trouble running my tests from command line. I have a separate project for the tests and usually using Rider where the tests run flawlessly. However, I want to run them in a CI environment and therefore need to be able to run them form command line.
I'm trying to run Projectname>"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" Test\Test.csproj NUnit Console Runner 3.4.0 Copyright (C) 2016 Charlie Poole
Runtime Environment
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR Version: 4.0.30319.42000
Test Files
Test\Test.csproj
Errors and Failures
1) Error : Test.MVCmodel.CoilClassTest.CoilCreateEmptyIdTest
System.BadImageFormatException : Could not load file or assembly 'UserInterface, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
at Test.MVCmodel.CoilClassTest.CoilCreateEmptyIdTest()
The same thing happens when running "C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" Test\bin\Debug\Test.dll
The Test Project is located inside the MainProject: Projectname\Projectname.csproj and Projectname\Test\Test.csproj
And yes, I have found quite a few posts similar on Stackoverflow, but I found no applicable solution.
--x86
flag, if you need to force x86 – Chris