unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.93k stars 725 forks source link

Svg doesn't display in publish version #16674

Open jeromelaban opened 6 months ago

jeromelaban commented 6 months ago

Discussed in https://github.com/unoplatform/uno/discussions/16672

Originally posted by **limeniye** May 10, 2024 ### Input information I have an image. ```XML ``` After executing the following command, 2 directories appear. ```PS msbuild /r /t:Publish /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:Platform=x64 /p:TargetFramework=net8.0-windows10.0.19041 /bl ``` But for some reason the image in the ```Release\net8.0-windows10.0.19041\win-x64\publish``` directory is not displayed. ![image](https://github.com/unoplatform/uno/assets/69314237/75a4b595-74b6-4853-8f3a-9820cf65819b) ### Output [UnoApp77ImagesDoesntDisplayInPublish.zip](https://github.com/unoplatform/uno/files/15273213/UnoApp77ImagesDoesntDisplayInPublish.zip) [msbuild.zip](https://github.com/unoplatform/uno/files/15273196/msbuild.zip) ### Package versions ```XML ``` ### Platforms - [x] WinUI
jeromelaban commented 5 months ago

This looks like WinAppSDK issue, as I can repro the same behavior with a bare WinAppSDK app. Try moving your app to single project to avoid having assets in a separate library.

We'll track this with a WinUI issue, but even in WinUI there are separate duplicate files issues that Uno currently works around.