aurelienjo
aurelienjo

Reputation: 85

Moq Unit Test disappear after solving badimageformatexception

So I had this problem : badimageformatexception

I had it once already, and solved it quickly.

But now I pulled a referenced project from Git, and when I match the correct CPU parameters in my test project, in order not to have these Warning messages

Warning The processor's architecture from 'MyProjet' currently building doesn't match the architecture form the reference 'PulledProject', Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL", "AMD64".

When CPU match, every test disappear in the test launcher. I re-built it, re-added references, cleaned it, I tried a lot of common manipulations, maybe some of you guys and gals have an idea ? It's pretty annoying.

Upvotes: 0

Views: 59

Answers (1)

aurelienjo
aurelienjo

Reputation: 85

So a colleague had the same problem and found this : https://github.com/Microsoft/vstest/issues/907

You need to change the architecture of the tests. I did tried before asking here, by changing the properties of my test project and it didn't worked.

But the way described in this link worked for me and my colleague : On the menu bar click on Test > Tests Settings > Default Processor Architecture > x64 (or whatever you need).

Upvotes: 1

Related Questions