Skip to content

Add MSBuild glob for Windows Assets#23314

Closed
jfversluis wants to merge 1 commit into
mainfrom
fix-16755
Closed

Add MSBuild glob for Windows Assets#23314
jfversluis wants to merge 1 commit into
mainfrom
fix-16755

Conversation

@jfversluis
Copy link
Copy Markdown
Member

Description of Change

Similar to #23269 but specific to Windows Assets.

This adds a glob that will take any asset under Platforms\Windows\Assets\** and put that in the app bundle root.

Potentially breaking change for people as one workaround was to just reference the file by specifying the whole path, for example: <Image Source="{OnPlatform flag.png, WinUI=Platforms/Windows/Assets/Images/flag.png}" />

Issues Fixed

Fixes #16755

@jfversluis jfversluis added area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows labels Jun 27, 2024
@jfversluis jfversluis requested a review from mattleibow June 27, 2024 11:23
@jfversluis jfversluis self-assigned this Jun 27, 2024
@jfversluis jfversluis requested a review from a team as a code owner June 27, 2024 11:23
@jfversluis jfversluis requested a review from Eilon June 27, 2024 11:23
@jfversluis jfversluis enabled auto-merge (squash) July 4, 2024 08:48
Copy link
Copy Markdown
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the Images sub folder? On android and iOS you would just stick things in the Platforms/Android/Resources/drawable (Android native convention) or Platforms/iOS/Resources (just in the folder)

For Windows, do we have any common practices that Images folder is important? What about non-image things?

I know I also did this here: https://github.com/dotnet/maui/blob/main/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/MauiApp.1.WinUI.csproj#L33

But, we I right? I just did that for the template.

What happens if I add a Platforms/Windows/Assets/?

I see this also has that pattern: https://learn.microsoft.com/en-us/windows/uwp/app-resources/tailor-resources-lang-scale-contrast

But, is there a guide doc or something?

@jfversluis
Copy link
Copy Markdown
Member Author

  • Do we want to make this specific to the Assets/Images folder?
  • How do subfolders behave on other platforms?

@jfversluis jfversluis disabled auto-merge July 4, 2024 14:53
@jfversluis jfversluis marked this pull request as draft July 4, 2024 14:54
@PureWeen PureWeen modified the milestones: .NET 9 SR2, .NET 9 Servicing Oct 31, 2024
@jfversluis
Copy link
Copy Markdown
Member Author

Not a priority for now

@jfversluis jfversluis closed this Apr 24, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MAUI SDK Ongoing Apr 24, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Windows image localization papercut

3 participants