-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Include all platforms in multi project template #28766
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
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 fixes the multi-project template to correctly include all platforms when the AllPlatforms variable is used, and it adds/updates tests to verify this behavior.
- Replaces test cases for Windows and macOS with WinUI and MacCatalyst for single platform builds.
- Introduces a new test (VerifyIncludedPlatformsInSln) to confirm that all expected platform projects are included when no platform argument is provided.
Files not reviewed (1)
- src/Templates/src/templates/maui-multiproject/MauiApp.1.sln: Language not supported
src/TestUtils/src/Microsoft.Maui.IntegrationTests/MultiProjectTemplateTest.cs
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
3605ebd to
76b0a6e
Compare
mattleibow
approved these changes
May 14, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
The multi-project template did not take into account the
AllPlatformsvariable and therefore when using the command-line to create a new project, the project would not include all platforms. This PR fixes that.Additionally, this adds a tests for this scenario to check if a platform or all platforms are included when created through the command line depending on the provided parameters.
Also, this PR fixes an issue where the
Info.plistfile was not correctly updated with theXmlEncodedAppNamevalue. Right now it was filled with just the project name that you would generate. If the project would contain special characters that are not compatible with XML (which theInfo.plistfile is), then the build would fail. For example, create a .NET MAUI project with the nameMultiProject@Symbol & More, would result in anInfo.plistnode of that same value, which is not valid XML. With this change, theMultiProject@Symbol & Moreproject name value is XML encoded and then replaced in theInfo.plistfile.The reported issue mentions .NET 10 where this was not working, but this is also not working for .NET 9.
Issues Fixed
Fixes #28695