-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BadImageFormatException building solution with unmanaged projects #302
Comments
I face the same issue. We execute our tests using vstest.console.exe and unfortunately this error causes the test run to fail despite there are no NUnit tests involved. I.e. we execute a native MSTest Dll and all tests run fine (via MSTest). Then the vstest.console.exe asks all other adapters if they find any tests for the given assembly. The NUnit 3 adapter returns an error, as it is not able to load the assembly. I debugged the issue and ended up with the following stack trace:
Same as reported in #248 the adapter version 3.4.1 works fine, e.g. ignores the native assembly. |
I tried to repro this using the Log4JDash sln by @MaxKot (the link in 1st post) Using the 3.7 adapter, it works with no errors. If you still have this issue @tuxxilla , can you provide a small repro sln ? |
@OsirisTerje Please find attached a test solution. See HowToReproduce.txt for details. The error occurs using NUnit Adapter 3.7. It looks as it was introduced after 3.4.1. I tried 3.5 and also observed a crash. Version 2.1.1 works fine (showing warning as expected). |
@OsirisTerje Are you able to reproduce this issue? |
I'm using Visual Studio 2017 and am also seeing a similar issue when attempting to build a solution which builds only a c++ application.
|
@markusrt Yep, confirmed. There are a couple of issues here, one is that we send out a warning, which should be ok, but we could "hide" it by tuning the verbosity. Then there are 2 more messages which are superfluous, and the error should not be there at all. |
… both calling methods have the same. #302
I have a solution with both managed and native projects. NUnit adapter seems to try to load a native DLL and fails whenever I rebuild the project. You can see the solution here: Log4JDash.
Error message (Log4JParserC.dll is an unmanaged library and Log4JDash.exe is an unmanaged application):
Visual Studio info:
Similar issue is also reported by @anttirt:
The text was updated successfully, but these errors were encountered: