Commit 3ea5317
Add cross-process mutex and retry logic for VS Setup Configuration COM API
The VS Setup Configuration COM API (ISetupConfiguration2) has a known
concurrency bug that causes failures (exit code 57005/0xDEAD) when
multiple processes enumerate VS instances simultaneously. This hits
template engine integration tests that run dotnet new in parallel.
The previous fix (PR #44930) added an in-process lock (s_guard) but
that doesn't help when multiple test processes call the API concurrently.
This fix adds:
- A named system mutex (Global\DotNetSdk_VSSetupConfiguration) to
serialize cross-process access to the COM API
- Retry logic with exponential backoff (3 attempts) as a safety net
for cases where external processes also call the API without our mutex
Fixes #44878
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent dec5a57 commit 3ea5317
1 file changed
Lines changed: 66 additions & 0 deletions
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
| |||
105 | 122 | | |
106 | 123 | | |
107 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
108 | 174 | | |
109 | 175 | | |
110 | 176 | | |
| |||
0 commit comments