Fix relative path in AspireWithMaui.slnx#13020
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13020Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13020" |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the relative path issue in AspireWithMaui.slnx where paths were not correctly translated relative to the solution's location, preventing the solution from loading properly. The fix updates the generation scripts to properly calculate relative paths from the AspireWithMaui directory.
Key changes:
- Updated
eng/restore-toolset.shto use a Python script that calculates proper relative paths - Updated
eng/restore-toolset.ps1to use PowerShell URI-based path resolution - Regenerated
AspireWithMaui.slnxwith correct relative paths and added the missing Aspire.Hosting.Maui.Tests project
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| playground/AspireWithMaui/AspireWithMaui.slnx | Regenerated file with corrected relative paths (../../ for root-level projects, ../ for sibling playground projects) and added Aspire.Hosting.Maui.Tests |
| eng/restore-toolset.sh | Replaced sed-based approach with Python script for robust path resolution, added python3 prerequisite check, and logic to insert Maui tests project |
| eng/restore-toolset.ps1 | Added helper functions for URI-based relative path calculation and XML manipulation, ensuring consistent path resolution on Windows |
|
Why do the MAUI solution paths need to be relative but the normal solution paths don't? |
|
@JamesNK The maui solution is now in the Maui playground folder. The Aspire one is at the root. |
Description
The paths in
AspireWithMaui.slnxwere not translated to its location and the solution would not load correctly. Tested locally, file in this PR updated from script.