Skip to content

Conversation

@StephaneDelcroix
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix commented Aug 26, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Replaces Contains(..., StringComparison.OrdinalIgnoreCase) with ToLowerInvariant().Contains(...) for case-insensitive string matching because .NET Standard 2.0 and/or .NET Framework 4.x does not have the nice new overloads.

Copilot AI review requested due to automatic review settings August 26, 2025 14:45
@StephaneDelcroix StephaneDelcroix requested a review from a team as a code owner August 26, 2025 14:45
Copy link
Contributor

Copilot AI left a 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 an MSBuild error by replacing deprecated StringComparison enum usage in MSBuild target files with a more compatible string comparison approach. The change ensures the XAML inflator type checking works correctly across different MSBuild versions.

  • Replaces StringComparison.OrdinalIgnoreCase with ToLowerInvariant().Contains() for case-insensitive string matching
  • Updates three conditional statements that categorize MauiXaml items by inflator type
  • Maintains the same logical behavior while using MSBuild-compatible string operations

@dalexsoto
Copy link
Member

@StephaneDelcroix / @mattleibow can you backport this to this branch as well please? release/10.0.1xx-rc1

@jfversluis
Copy link
Member

/backport to release/10.0.1xx-rc1

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx-rc1: https://github.com/dotnet/maui/actions/runs/17241840407

@mattleibow mattleibow changed the title fix msbuild error Use ToLowerInvariant().Contains(...) for .NET Framework Aug 26, 2025
@mattleibow mattleibow merged commit 5ee9eb6 into net10.0 Aug 26, 2025
139 of 148 checks passed
@mattleibow mattleibow deleted the fixmsbuild branch August 26, 2025 16:56
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants