-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Visual studio is crashing when using self builded Hostfxr #110895
Comments
Tagging subscribers to this area: @tommcdon |
Hello @ArthurVasseur! When debugging managed code, VS will load the .NET debugging services binaries ( mscordbi.dll and mscordaccore.dll) built with the coreclr that is being loaded into the debuggee process. When debugging a debug version of the runtime, any asserts that fire mscordbi.dll or mscordaccore.dll can cause the VS process to crash (due to an unhandled break instruction). My guess is that the assert that is firing on the debuggee side triggered another assert in either mscordbi.dll or mscordaccore.dll. There are a few potential workarounds:
In addition to the above, it's possible to debug the assert occurring in VS by attaching a second instance of VS to the 1st VS that is crashing. Hope this helps! |
Hello @tommcdon, thanks for your answer! Thanks for the explanaition about mscordbi, Setting Happy Holidays! |
I cloned the repository (checked out on v9.0.0) and ran
.\build.cmd
to build the entire project.In my personal project, I am dynamically loading the
hostfxr
library using the path:dotnet/runtime/artifacts/obj/Microsoft.NETCore.App.Bundle/Debug/net9.0/win-x64/output/host/fxr/9.0.0/hostfxr.dll
In the project settings, I configured the debugger type to
Mixed (.NET Core)
However, Visual Studio crashes when the following function call is executed:
hostFxrGetRuntimeDelegate(_hostfxrHandle, hdt_get_function_pointer, &function);
This is my program output:
The text was updated successfully, but these errors were encountered: