-
Notifications
You must be signed in to change notification settings - Fork 285
Update Maui runs to get NuGet.config and Version.Details.xml from maui repo #5056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…rsion.details.xml.
This reverts commit d29d084.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR automates MAUI workload dependency management by downloading configuration files directly from the dotnet/maui repository, eliminating the need for manual Version.Details.xml maintenance in the performance repository. The changes enable zero-maintenance automation for MAUI version updates.
Key Changes:
- Introduced
MauiNuGetConfigContextcontext manager to temporarily merge MAUI's package feeds into the repo's NuGet.config during build operations - Refactored
generate_maui_rollback_dict()to download MAUI's Version.Details.xml directly from GitHub instead of reading from local repository - Updated all 7 MAUI scenario pre.py files to use the new context manager approach for NuGet.config management
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scenarios/shared/mauisharedpython.py | Core automation logic: added context manager for NuGet config merging, refactored rollback dictionary generation to download from MAUI upstream, added sync function for Version.Details.xml |
| src/scenarios/mauiandroid/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauiblazorandroid/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauiblazordesktop/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauiblazorios/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauidesktop/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauiios/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| src/scenarios/mauisamplecontentandroid/pre.py | Updated to use MauiNuGetConfigContext for temporary NuGet.config merging during build |
| eng/Version.Details.xml | Removed all MAUI workload dependencies as they are now fetched dynamically from upstream |
Comments suppressed due to low confidence (7)
src/scenarios/mauiios/pre.py:9
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import remove_aab_files, install_latest_maui, download_maui_nuget_config
src/scenarios/mauisamplecontentandroid/pre.py:8
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import remove_aab_files, install_latest_maui, download_maui_nuget_config
src/scenarios/mauiblazordesktop/pre.py:12
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import install_latest_maui, download_maui_nuget_config
src/scenarios/mauiblazorandroid/pre.py:8
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import remove_aab_files, install_latest_maui, download_maui_nuget_config
src/scenarios/mauiblazorios/pre.py:8
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import remove_aab_files, install_latest_maui, download_maui_nuget_config
src/scenarios/mauidesktop/pre.py:11
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import install_latest_maui, download_maui_nuget_config
src/scenarios/mauiandroid/pre.py:8
- Import of 'download_maui_nuget_config' is not used.
from shared.mauisharedpython import remove_aab_files, install_latest_maui, download_maui_nuget_config
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Find the repo's NuGet.config by walking up from the current directory. | ||
| This works for both local (c:/Users/.../performance) and pipeline (D:/a/1/s/performance/CorrelationStaging/payload/performance) scenarios. |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring formatting is inconsistent with the rest of the file. This file uses 4-space indentation for docstring content (see extract_latest_dotnet_feed_from_nuget_config at line 238 and download_maui_nuget_config at line 281). Consider adding 4 spaces of indentation to align with the existing style.
| Find the repo's NuGet.config by walking up from the current directory. | |
| This works for both local (c:/Users/.../performance) and pipeline (D:/a/1/s/performance/CorrelationStaging/payload/performance) scenarios. | |
| Find the repo's NuGet.config by walking up from the current directory. | |
| This works for both local (c:/Users/.../performance) and pipeline (D:/a/1/s/performance/CorrelationStaging/payload/performance) scenarios. |
| url = f'https://raw.githubusercontent.com/dotnet/maui/{target_framework_wo_platform}/NuGet.config' | ||
| getLogger().info(f"Downloading MAUI NuGet.config from {url}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward as well, is the net11 work going to be done on main or a new branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmarinho which branch of dotnet/maui we should be using here (main vs net11/net10) so that we always have the latest nuget.config? (for context, we are building maui apps with the latest versions of .NET SDK, iOS/Android workloads + MAUI)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main will stay net10.0 until net11.0 goes GA
all net11.0 development will stay on net11.0
Because of the high volume of SR work that MAUI does compared to other repositories and the need to keep community members productive.
We keep main as always workable with public bits
…e correct feeds to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks. I would just wait for confirmation from MAUI team what branch should we keep targetting main vs net11.
Automate MAUI workload dependency management
Eliminates manual Version.Details.xml maintenance and NuGet maintenance for MAUI scenarios by
downloading dependency configuration directly from upstream dotnet/maui
repository. This ensures zero-maintenance automation - MAUI version updates
no longer require changes to the performance repository.
Changes:
MAUI's package feeds into repo NuGet.config during build operations,
with automatic cleanup on exit
Version.Details.xml directly from GitHub instead of reading local file
mauiblazorandroid, mauiblazorios, mauiblazordesktop,
mauisamplecontentandroid, mauidesktop) to use context manager approach
Test run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2853821&view=results
This currently works for our net10 tfm (main branch version) builds of maui android. Older frameworks are untested.
The change I am most unsure of is the update to the rollbacks band versioning as it is unclear if not having the Mapping_comments to set the bands will cause failure.
Follow-up:
This should fix:
#5055