xUnit Problem after update to 2022.3
I have changed nothing but updating on the most recent version. Afterwards non of my unittests is running anymore. Error message is as follows. Any ideas?
Test not run
Last runner error: Test runner agent exited unexpectedly Process C:\Program Files\dotnet\dotnet.exe:9860 exited with code '-532462766': Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'JetBrains.ReSharper.TestRunner.Merged, Version=2.11.1.92, Culture=neutral, PublicKeyToken=5c492ec4f3eccde3'. Uncaught exception during type initialization. (0x80131534) File name: 'JetBrains.ReSharper.TestRunner.Merged, Version=2.11.1.92, Culture=neutral, PublicKeyToken=5c492ec4f3eccde3' ---> System.TypeInitializationException: The type initializer for 'JetBrains.ReSharper.TestRunner.Program' threw an exception. ---> System.InvalidOperationException: Dependency resolution failed for component C:\Program Files\JetBrains\Rider\r2r\2022.3.0.0R\2F4FE577D4C328FC0A1532E25DDB965\TestRunner\netcoreapp3.0\ReSharperTestRunner.dll with error code -2147450750. Detailed error: Hostpolicy must be initialized and corehost_main must have been called before calling corehost_resolve_component_dependencies. at System.Runtime.Loader.AssemblyDependencyResolver..ctor(String componentAssemblyPath) at JetBrains.ReSharper.TestRunner.Program..cctor() in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\TestRunner\Program.cs:line 16 --- End of inner exception stack trace --- at JetBrains.ReSharper.TestRunner.Program.ContextOnResolving(AssemblyLoadContext ctx, AssemblyName assemblyName) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\TestRunner\Program.cs:line 42 at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) at JetBrains.ReSharper.TestRunner.Program.Run(String[] args) at JetBrains.ReSharper.TestRunner.Program.Main(String[] args) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\TestRunner\Program.cs:line 25
Please sign in to leave a comment.
Hello Lutz Jahnke!
The issue you described looks like a known bug RSRP-490915
Would you please check if there is the following entry in the `csproj` file?
Hi Alexander Nikolaenko
Yes, this line is part of one of the csproj files in my solution. Is there a workaround?
Best
The workaround is to remove this line from the project file :)
The bug I referenced is already fixed, and the fix will be available in the upcoming 2022.3.2 update.