-
Notifications
You must be signed in to change notification settings - Fork 152
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
System.TypeInitializationException: The type initializer for 'NUnit.Engine.Internal.TestAssemblyResolver' threw an exception: System.ArgumentNullException: Value cannot be null. (Parameter 'path1') #1351
Comments
|
NUnit Console 3.16.3 (Release) Not sure, since it only crashes on one machine ... I already checked the dotnet install paths because I recognized that GetDotnetInstallDirectory() might return a null path but that seems not the issue ... at least the settings on both machines are identical in that regard. At the moment I ran out of ideas TBH. |
Looking at the code that seems to be the place where the |
The test assembly was set to x86 (for whatever reason), changed to AnyCPU that solved at least the actual issue at hand. But maybe the error message could be improved? Just a suggestion. Anyway, thanks for the help! |
I agree. A check if the path is not null and exists would result in a better error message |
It looks like the error is in the use of statics initialized in lines 26-28 of However, I think an error message at this point would be inappropriate because it's possible for any of the three statics to be null and calling code needs to check. For example...
In retrospect, we should probably have methods to query whether each component is installed rather than relying on a null result to indicate their absence. |
I have the same error in my project. NUnit.Engine.NUnitEngineException: An exception occurred in the driver while loading tests. here is a part of my project file:
any idea how to fix this?? |
See my comment on 8 July |
Hello Charlie, I checked your comment, and I don't see any reason on the server which is giving the error: here is output of the runtimes existing on this server both are 64x processes. on my local machine, where no problems occuring i have the following: could the different versions be the cause of the error? |
Hello again,
the value is the home directory of dotnet. in my case it was C:\Program Files\dotnet\ |
Test started via
nunit3-console.exe .\bin\mytestassembly.dll
Eventlog
The text was updated successfully, but these errors were encountered: