Repository navigation
suggest show loader snaps in the windows dll load error - #137720
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/area-system-runtime |
|
Tagging subscribers to this area: @dotnet/interop-contrib |
|
I like this suggestion. Aligns with what we do on non-Windows and gives people solid next steps. @elinor-fung @jtschuster @jkoritzinsky Any concerns? |
|
I like it as well. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the Windows native-library load diagnostic guidance update.
No open issues 🎉
What changed in this PR
Adds diagnostic guidance to Windows native-library load errors, addressing the Windows-specific guidance gap noted in #11891 without changing loading behavior.
Changes:
- Suggests enabling Show Loader Snaps with
gflagsand running the application under a debugger. - Applies consistent wording to both resource messages while preserving library-name and error-detail placeholders.
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/Resources/Strings.resx | Adds Windows diagnostic guidance to the managed native-library load error. |
| src/coreclr/dlls/mscorrc/mscorrc.rc | Adds matching guidance to the CoreCLR DllImport load error. |
Review effort: Balanced
|
/ba-g Unrelated failures. |
fixes #11891
the linux and mac messages for a failed native library load say how to diagnose it (LD_DEBUG, DYLD_PRINT_LIBRARIES). the windows one did not. it now suggests show loader snaps. changed in both mscorrc.rc (DllImport) and CoreLib's Strings.resx (NativeLibrary.Load).
tested: on windows, a DllImport and a NativeLibrary.Load of a missing dll both show the new message with coreclr.dll and CoreLib built from this change.