Commit 7229c7c
[release/10.0] Fix removing module from appdomain in DB_IPCE_UNLOAD_MODULE event (#124241)
Backport of #123931 to release/10.0
/cc @hoyosjs @tommcdon
## Customer Impact
- [X] Customer reported
- [ ] Found internally
When loading and unloading an Assembly multiple times in new
AssemblyLoadContexts Visual Studio will abruptly end debugging before
program completion with the following error:
> 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.
Originally reported via Visual Studio feedback item [Fatal error
encountered when debugging .net 10 app using collectible assemblies in
VS2026](https://developercommunity.visualstudio.com/t/Fatal-error-encountered-when-debugging-/10982926),
then moved to GH issue #123930.
## Regression
- [X] Yes
- [ ] No
Regression from .NET 9, introduced in .NET 10 on #117224 and was a
missed case when attempting to address the issue in #118414.
## Testing
Validated with customer's reproducible test case on #123930
## Risk
Low. The debugger module caches uses the module as the hash key rather
than the assembly. This was a missed case when fixing #118414 where we
were still incorrectly using the assembly as the lookup key.
Co-authored-by: Tom McDonald <tommcdon@microsoft.com>1 parent 190c0c2 commit 7229c7c
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5225 | 5225 | | |
5226 | 5226 | | |
5227 | 5227 | | |
5228 | | - | |
| 5228 | + | |
5229 | 5229 | | |
5230 | 5230 | | |
5231 | 5231 | | |
| |||
0 commit comments