"Failed to locate managed application" when debugging tests in Rider

After upgrading my solution to .NET 8 and updating NuGet packages as applicable I am receiving an error anytime I try to debug a unit test.

The error looks to have an issue finding the build of MSTest Test Adapter, and might be failing to resolve the “_common” variable for the .NET version to target? The file path mentioned exists and inside the build folder there are separate folders for each supported .NET version.

I'm currently on Rider 2024.3.7, but have tried downgrading and also moving to the nightly build, neither of which resolved the situation. I have also uninstalled, reinstalled, and downgraded the MSTest Test Adapter package a few times.

Any insight is welcome. Thanks in advance.

 

Exception from the Debug Threads and Variables window:

System.InvalidOperationException: Dependency resolution failed for component /Users/[myuser]/.nuget/packages/mstest.testadapter/3.8.3/build/_common with error code -2147450734. Detailed error: Failed to locate managed application [/Users/[myuser]/.nuget/packages/mstest.testadapter/3.8.3/build/_common]

   at System.Runtime.Loader.AssemblyDependencyResolver..ctor(String componentAssemblyPath)
   at JetBrains.ReSharper.TestRunner.Isolation.AssemblyLoader.NugetBoundResolver.Resolver..ctor(String path) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\TestRunner.Utilities\Isolation\AssemblyLoader.NetCore.cs:line 287

0
2 comments

Hello Ezumwalt,

Thank you for contacting JetBrains Support. I'm glad to work with you on this ticket.

We have a similar issue reported before. In that case, the issue occurs because "Any CLR Exception" breakpoint is checked, as below: 

Please disable such breakpoints if exisiting. With such breakpoint, any first-chance exception from dotnet library or other non-user code will suspend the execution, thus cause the issue.

Let me know if it doesn't help. 

Regards,

Tom

0

Hello Tom,

Thank you for the response, that is exactly where I needed to be looking. It was not the “Any Exception” option giving me trouble but a “System.InvalidOperationException”. Unchecked and now I can successfully debug all of my unit tests. Thank you so much!

For anyone else finding this later and, like my case, you aren't positive where to find these options: Run a debug session and click the double red dots in the debug window (or use shift + cmd + F8)

 

Thank again,

Eric Z

0

Please sign in to leave a comment.