-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
Copied from Visual Studio feedback item Fatal error encountered when debugging .net 10 app using collectible assemblies in VS2026
Reproduction Steps
The error occurs with the app targeting .net 10 with the rc1 or rc2 Sdk (I’ve only tried these two). It does not occur when targeting .net 9. The program appears to complete correctly when not running under the debugger. I am using Visual Studio 2026 Insiders version 11111.16
A reproducible sample project is attached.
UnloadableTest.zip
Expected behavior
Debugging should succeed
Actual behavior
When loading and unloading an Assembly multiple times in new AssemblyLoadContexts Visual Studio will abruptly end debugging before program completion with a message box saying:
A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x80131c36. ErrorCode=0x0.
Regression?
Yes - from .NET 9
Known Workarounds
No known workarounds
Configuration
No response
Other information
No response