@@ -83,8 +83,33 @@ BeforeAll {
8383 function GetSentryPackageVersion ()
8484 {
8585 $proj = Join-Path $PSScriptRoot ' ..\src\Sentry\Sentry.csproj'
86- $version = dotnet msbuild $proj - nologo - property:Configuration= Release - getProperty:Version |
87- Select-Object - Last 1
86+
87+ # Log diagnostic information
88+ Write-Host " === GetSentryPackageVersion Diagnostics ==="
89+ Write-Host " PSScriptRoot: '$PSScriptRoot '"
90+ Write-Host " Project path: '$proj '"
91+ Write-Host " Current directory: '$ ( Get-Location ) '"
92+
93+ # Log MSBuild version information
94+ Write-Host " === MSBuild Version Info ==="
95+ $msbuildVersions = Get-Command msbuild - ErrorAction SilentlyContinue | Select-Object Source, Version
96+ Write-Host " MSBuild commands found: $ ( $msbuildVersions | ConvertTo-Json ) "
97+
98+ $dotnetVersions = dotnet -- list- sdks
99+ Write-Host " Installed .NET SDKs: $dotnetVersions "
100+
101+ $dotnetMsbuildVersion = dotnet msbuild - version 2>&1
102+ Write-Host " dotnet msbuild version: $dotnetMsbuildVersion "
103+
104+ # Log the actual command output
105+ Write-Host " === Running dotnet msbuild command ==="
106+ $rawOutput = dotnet msbuild $proj - nologo - property:Configuration= Release - getProperty:Version 2>&1
107+ Write-Host " Raw output from dotnet msbuild: '$rawOutput '"
108+ Write-Host " Exit code: $LASTEXITCODE "
109+
110+ $version = $rawOutput | Select-Object - Last 1
111+ Write-Host " Selected version (last line): '$version '"
112+
88113 if (-not $version -or [string ]::IsNullOrWhiteSpace($version )) {
89114 throw " Could not resolve package version from $proj "
90115 }
0 commit comments