Skip to content
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

Add MSBuild glob for Windows Assets #23314

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add MSBuild glob for Windows Assets #23314

wants to merge 1 commit into from

Conversation

jfversluis
Copy link
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 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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows 🪟
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Windows image localization papercut
2 participants