Hi
referencing to my comment on NUnit 4.0.0 ( nunit/nunit#4563 (comment) ) I want to report the following issue.
Runtime: .NET 8
NUnit: 4.2.1
NUnit.Engine: 3.18.1
I developed a custom NUnit agent which instantiates a local test runnter the following way:
TestEngine.WorkDirectory = Path.GetDirectoryName(testFile); TestEngine.InternalTraceLevel = InternalTraceLevel.Off; TestPackage = new TestPackage(testFile); TestRunner = TestEngine.GetRunner(TestPackage); TestNodes = TestRunner.Explore(TestFilter.Empty);
With NUnit 3.14.0 / Engine 3.16.3 this was working.
With the latest versions, I get
27.08.2024 09:07:04.275 NUnit.Engine.NUnitEngineException: An exception occurred in the driver while loading tests.
---> System.IO.FileNotFoundException: Could not load file or assembly 'UnitTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Das System kann die angegebene Datei nicht finden.
File name: 'UnitTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at NUnit.Engine.Drivers.NUnitNetStandardDriver.Load(String testAssembly, IDictionary`2 settings)
at NUnit.Engine.Runners.DirectTestRunner.LoadDriver(IFrameworkDriver driver, String testFile, TestPackage subPackage)
--- End of inner exception stack trace ---
at NUnit.Engine.Runners.DirectTestRunner.LoadDriver(IFrameworkDriver driver, String testFile, TestPackage subPackage)
at NUnit.Engine.Runners.DirectTestRunner.LoadPackage()
at NUnit.Engine.Runners.DirectTestRunner.EnsurePackageIsLoaded()
at NUnit.Engine.Runners.DirectTestRunner.Explore(TestFilter filter)
at NUnit.Engine.Runners.MasterTestRunner.Explore(TestFilter filter)
at NUnitAgent.Program.ProcessMessageAsync(String rawMsg, CancellationToken ctx) in NUnitAgent\Program.cs:line 306
I guess the comment from @stevenaw ( nunit/nunit#4563 (reply in thread) ) gives a hint about the root cause.
I hope that this gets fixed. If you need further information or support, please contact me.
Thanks a lot
Daniel
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4