Skip to content
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

Exception occurred while GoogleTestDiscoverer was loading tests. Process exited with code -1073741819 #8

Open
j4yk opened this issue Mar 7, 2015 · 8 comments

Comments

@j4yk
Copy link

j4yk commented Mar 7, 2015

Hello,

when I built my solution the following appeared in the Tests output console:

------ Discover test started ------
GoogleTest: Does C:\Users(...)\xml3d-exporter-testdtest.exe match [Tt]est[s]{0,1}.exe: true
An exception occurred while test discoverer 'GoogleTestDiscoverer' was loading tests. Exception: Process exited with code -1073741819
========== Discover test finished: 0 found (0:00:00,393) ==========

The test explorer stays empty.

What might be the cause or what steps should be taken to investigate?

@DanWatkins
Copy link

This happens to me as well.

@metallermartin
Copy link

This happens to me as well. I suspect the reason is that in Visual Studio under Test->Test Settings->Default architecture an incorrect architecture is selected. E.g. you build x64, but look for x86 tests in my case.

@metallermartin
Copy link

Well, obviously the Test Settings are not the reason for this message. I again got it today with the correct setting

@sveolon
Copy link

sveolon commented Dec 3, 2015

Happens for me every time I try to load my project:

------ Discover test started ------
GoogleTest: Does C:\Users\myuser\myrepo\projects\windows\Debug\testrunner_tests.exe match [Tt]est[s]{0,1}.exe: true
An exception occurred while test discoverer 'GoogleTestDiscoverer' was loading tests. Exception: Process exited with code -1
========== Discover test finished: 0 found (0:01:59,1322548) ==========

The exception:
An exception of type 'System.BadImageFormatException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not load file or assembly 'file:///C:\Users\myuser\myrepo\projects\windows\Debug\testrunner_tests.exe' or one of its dependencies. The module was expected to contain an assembly manifest.

If there is a handler for this exception, the program may be safely continued.

The call stack is here:
http://pastebin.com/fwGircaK

$ file ./projects/windows/Debug/testrunner_tests.exe
./projects/windows/Debug/testrunner_tests.exe: PE32 executable (console) Intel 80386, for MS Windows

@sveolon
Copy link

sveolon commented Dec 4, 2015

Update: I took a look into the exception thrown.
It says "Could not load file or assembly 'file:///C:\Users\myuser\myrepo\projects\windows\Debug\testrunner_tests.exe' or one of its dependencies. The module was expected to contain an assembly manifest."
The HResult is 0x80131018.

So it is trying to load my test as if it was an assembly and fails. Looks like an obvious bug.

@markusl
Copy link
Owner

markusl commented Dec 4, 2015

It sounds like some of its dependencies are missing or the system expects you to have an assembly manifest file for the executable.

@sveolon
Copy link

sveolon commented Dec 4, 2015

I would like to continue digging into the issue, but as I have no experience in building VS Extensions, some info may be helpful. the issue happens when I'm running VS 2013 extension. However, it is not clear for me how to build and debug a 2013 version.

@yuemw
Copy link

yuemw commented Nov 15, 2017

Add compiler path to computer path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants