Skip to content

Commit d330abe

Browse files
committed
OX-02 P14: diagnose why Owen.VisualStudio.dll is not in devenv
The run on bd0ef66 realized Use.cs, read the Error List through UI Automation (CS0029 | LiveFixture | Use.cs | 10), but Owen.VisualStudio.dll never loaded into devenv and the ActivityLog does not mention it. Collect the hive's installed extensions, the MEF composition's .err files and the VSIXInstaller logs, and stop early when the extension is not in the process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ZFvhLx1fM9Gerg4dKsZcL
1 parent bd0ef66 commit d330abe

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎scripts/vs/owen-vs-acceptance.ps1‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@ function Retry([scriptblock]$Block, [int]$Seconds = 60) {
7171
}
7272
}
7373

74+
# Where an installed extension and the MEF composition's own errors live, for the evidence.
75+
function Collect-Diagnostics {
76+
$hive = Get-ChildItem (Join-Path $env:LOCALAPPDATA 'Microsoft\VisualStudio') -Directory -ErrorAction SilentlyContinue |
77+
Where-Object { $_.Name -like "*$RootSuffix" }
78+
foreach ($h in $hive) {
79+
Log "hive: $($h.FullName)"
80+
Get-ChildItem (Join-Path $h.FullName 'Extensions') -Recurse -ErrorAction SilentlyContinue |
81+
Where-Object { $_.Name -like '*Owen*' -or $_.Name -like '*.vsixmanifest' -or $_.Name -like 'extensions.*' } |
82+
ForEach-Object { Log " ext: $($_.FullName)" }
83+
Get-ChildItem (Join-Path $h.FullName 'ComponentModelCache') -ErrorAction SilentlyContinue | ForEach-Object {
84+
Log " cache: $($_.Name) $($_.Length)"
85+
if ($_.Name -like '*.err') { Copy-Item $_.FullName (Join-Path $Out $_.Name) -ErrorAction SilentlyContinue }
86+
}
87+
}
88+
Get-ChildItem $env:TEMP -Filter 'dd_VSIXInstaller*' -ErrorAction SilentlyContinue | ForEach-Object { Copy-Item $_.FullName $Out -ErrorAction SilentlyContinue }
89+
}
90+
7491
# ---- Visual Studio ----------------------------------------------------------------------------
7592
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
7693
$vs = (& $vswhere -latest -products * -format json | ConvertFrom-Json)[0]
@@ -151,8 +168,16 @@ for ($k = 0; $k -lt 60 -and -not $loaded; $k++) {
151168
try { $loaded = @((Get-Process -Id $proc.Id).Modules | Where-Object { $_.FileName -like '*Owen.VisualStudio.dll' })[0] } catch { }
152169
if (-not $loaded) { Start-Sleep -Seconds 1 }
153170
}
171+
if (-not $loaded) { Collect-Diagnostics }
154172
Check "vsix-loaded" ($null -ne $loaded) "Owen.VisualStudio.dll in devenv: $(if ($loaded) { $loaded.FileName } else { 'not loaded' })"
155173
Shot "opened"
174+
if (-not $loaded) {
175+
# nothing below can pass without the extension in the process: stop with the evidence
176+
$results.failed = $true
177+
$results | ConvertTo-Json -Depth 8 | Set-Content (Join-Path $Out 'results.json') -Encoding UTF8
178+
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
179+
exit 1
180+
}
156181
$td = Retry { $doc.Object('TextDocument') }
157182

158183
# ---- trace ------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)