-
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
NUnit3TestAdapter integration: Exception when using NUnit.Engine 3.16.2 #1307
Comments
You'll want to figure out what subdirectory name it is trying to process when it fails. It's likely your .NET 8.0 sdk directory. |
No, it is not, I have not installed net 8. Going to debug it to find out :-) |
Variable name is the |
Also note that we wouldn't in It may be useful to add some WriteLines in the loop that calls |
The stacktrace is long, and I agree it should be written out, but also that the code should allow for null version. This might not be the only dll that have that. I believe this dll is rather old, and even if dotnet requires Version to be not null (ref dotnet/runtime#4467) we might stumble upon something like this. Also, there should be a fix in dotnet (ref dotnet/coreclr#1522) that set this to Version=0. There is no monotouch dll anywhere in the bin or lower, so it picks it up from somewhere else. It has something to do with Xamarin I think, so there might be some dependencies pointing there. I think we should check this and just set Version to 0. It will make the engine more robust. |
Ah it's outside of the loop! The loop could still cause problems. Maybe the method shouldn't be called if name.Version is null. |
I tested it locally and this one didn't crash at least, but I got another exception when creating the engine, the TestEngineActivator.CreateInstance() returned null. It may be related, or not. |
@CharliePoole I added that nullcheck as you suggested, and that was the thing that was needed. About the TestEngineActivator.CreateInstance() , if that returned null - which it seems to do in some cases, I simply do a new TestEngine() and that did the trick. I seem to remember you mentioned this some time back. |
See the following branch in the adapter repo: https://github.com/nunit/nunit3-vs-adapter/tree/engine316-2
The adapter test project has to be set to run only netcore3.1 (but that is not this issue, just to be able to run it at all).
The test failing is: ThatDiscovererNUnitEngineAdapterIsInitialized
The exception happens here:
So it fails at NUnit.Engine.Internal.TestAsemblyResolver.FindBestVersionDir
The runner is MasterTestRunner
The filter contains the method being run, and that is that.
The text was updated successfully, but these errors were encountered: