-
Notifications
You must be signed in to change notification settings - Fork 1.9k
MAUI projects with an ampersand in the name can't be built or loaded #21090
Copy link
Copy link
Closed
Labels
area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerfixed-in-8.0.70fixed-in-9.0.0-preview.6.24327.7platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerfixed-in-8.0.70fixed-in-9.0.0-preview.6.24327.7platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Description
If I create a project with a name like "foo&bar" I'm unable to build it from the command line or open it in Visual Studio. Other types on .NET projects don't seem to have this issue.
Steps to Reproduce
dotnet new maui --name "foo&bar"Result: Fails with:
error MSB4025: The project file could not be loaded. An error occurred whi le parsing EntityName. Line 24, position 25.The line it's complaining about is the following (position number given is the one after the ampersand):
<ApplicationTitle>Foo&Bar</ApplicationTitle>A potential fix is to use a different token here:
maui/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
Line 24 in 7639a2c
Note: You'll get a similar error if you try to load the project in Visual Studio:
Link to public reproduction project repository
No response
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
Don't use an ampersand in project names
Relevant log output
No response