Publish app not rendering images.
See original GitHub issueDescription
Published app doesn’t render any images.
Steps to Reproduce
- Create new MAUI Project Visual studio creates one templated project with “Hello world text” + one image(dotnet_bot.svg) in center of window.
- Publish app using command
open cmd > set path to project directory (cd <project-directory-path>)
Run following command
dotnet publish -f net7.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true - Open <project-directory-path>/bin/release/publish/YourProjectName.exe Observe image(dotnet_bot.svg) is not rendering in UI anywhere.
Link to public reproduction project repository
NA
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Some of the images are not coming after Publishing WPF ...
I ran the application on the client PC and I noticed that some of my images are not appearing e.g. Background images of...
Read more >Solved: Galleries not rendering properly after publishing
Solved: Hello, I am running into an issue where my galleries load just fine in the designer when I click Preview. However, when...
Read more >Why my images are not showing when i deployed to ...
I deployed empty image folder, and the images are uploaded by the user which is visiting the site. Do the uploaded image not...
Read more >How to Render Images in a React App | by Carlie Anglemire
I found using require() useful when I wanted to render an image dynamically instead of hard-coding the file path.
Read more >Images not rendering | Optimizely Developer Community
The settings you have above only work for Azure publishing, not local. I have the following setting in my Web.Release.config which is used...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My workaround, a powershell script that runs via a afterPublish target:
After Publish Target in csproj:
Also if you change your commandName in launchSettings.json from MSIXPackage to Project, the same happens. No images are in the bin directory.