-
Notifications
You must be signed in to change notification settings - Fork 153
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
Assembly loading deduplication #1217
Comments
Are you running the NUnit ConsoleRunner or the .NET Core ConsoleRunner? Unfortunately, we call them both |
Im running the one from this repository (compiles to |
I'm afraid that's the point: there are two different runners in this repo, with different capabilities and the same executable name. Probably a bad decision, but we're stuck with it for now, at least till we do a breaking release. :-( Since it builds both the exe and the dll, I'm guessing that you're running the .NET Core Console Runner out of the net-6.0 directory. Please take a minute and read #1101 and we'll go on from there. :-) As you see, there is a lot of uncertainty around the future of that runner. It may end up getting all the features of the standard (net20) console runner or it may be renamed and serve only for use under the .NET CLI. If you're a regular user of the CLI, please add any comments, wishes, etc. to that issue! If you run your tests using the same command-line, but using the standard runner in the net20 directory, each of your test assemblies will be isolated in separate processes, running under .NET 6.0. I think your suggested fix is a good one if we continue to allow running multiple assemblies under the .NET Core runner. OTOH if we aren't supporting it, the best fix is probably to give you an error when you enter multiple assemblies on the command line. I think we should probably do whatever I'd welcome your ideas on which way to go. Even though I'm maintaining it, I'm not a big user of the .NET Core runner myself. And, of course, contributions are always welcome! |
Yep, i was running from Anyway, i've reproduced a bug with multiple assemblies loading even within one test dll. Ill try to throw redundant stuff out to come with a minimum PoC showing the problem, so it can be debugged more easily. P.S. correct me if im wrong. If all runners (in-process vs external process) use the same |
This issue has been resolved in version 3.16.0 The release is available on: |
We have test solution containing of few test assemblies, lets say
TestA
,TestB
. They're referencing someCommon
. While running those tests likenunit-console.exe TestA.dll TestB.dll
-Common
is being loaded twice, leading to runtime failures.Can we add a check to the
CustomAssemblyLoadContext
?something like this:
since we have no multiple AppDomains in netcore and up - maybe there is no point loading those assemblies multiple times?
Of course theres a workaround to simply run them separately, but still would be nice to fix if thats an issue.
The text was updated successfully, but these errors were encountered: