[xharness] Use 'dotnet build -getProperty:...' instead of temporary PropertyInspector project - #25862
Conversation
…ropertyInspector project Replace the fragile approach of creating a temporary PropertyInspector.csproj that imports the target project with a direct 'dotnet build -getProperty:...' invocation. This avoids the SIGSEGV crashes (exit code 139) seen in CI. The new approach: - Runs 'dotnet build <project> -getProperty:<prop> -t:<target>' directly - Captures stdout separately (with Timestamp=false) to get clean output - No longer needs temporary files (PropertyInspector.csproj/.txt) - Adds MSBuildSDKsPath=null to env vars (matching other dotnet invocations) Fixes #25860 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 4fab211.
There was a problem hiding this comment.
Pull request overview
This PR updates xharness’ MSBuild property evaluation logic to avoid creating a temporary PropertyInspector.csproj, instead invoking dotnet build <project> -getProperty:<prop> directly to reduce CI flakiness (SIGSEGV/exit code 139) when locating app bundles.
Changes:
- Replace temporary “PropertyInspector” project generation with a direct
dotnet build -getProperty:...invocation on the target project. - Capture stdout separately (without timestamps) and return it as the evaluated property value.
- Align dotnet invocation environment by clearing
MSBUILD_EXE_PATHandMSBuildSDKsPath.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #a593723] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #a593723] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build #a593723] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #a593723] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 199 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. [attempt 2] Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Replace the fragile approach of creating a temporary PropertyInspector.csproj
that imports the target project with a direct 'dotnet build -getProperty:...'
invocation. This avoids the SIGSEGV crashes (exit code 139) seen in CI.
The new approach:
Fixes #25860