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

Creating an unpackaged Windows Maui app STILL does not work. #23858

Open
mobynet1 opened this issue Jul 26, 2024 · 11 comments
Open

Creating an unpackaged Windows Maui app STILL does not work. #23858

mobynet1 opened this issue Jul 26, 2024 · 11 comments
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Milestone

Comments

@mobynet1
Copy link

mobynet1 commented Jul 26, 2024

Description

I thought I had read that the issue with fonts and icons not showing up when doing an unpackaged Windows Maui app was fixed. I am finding it is not fixed. I just followed the instructions on how to create an unpackaged release and it still does not work. This is a GLARING deficiency in the way Maui applications are published.

I get that Xamarin apps were probably mostly going to be delivered via the App Store. But, I am positing that a majority of desktops apps will not now or ever be distributed through the app store. As a developer, I resent the fact that I have to contort myself into getting something I can deliver to my customers easily. Having to manually edit the project file and issue dotnet commands from the command line just to get an unpackaged deliverable is unacceptable. If the Maui team had looked at doing the initial release as not only a mobile-first (Xamarin port) but also how to support ALL that WPF did, you would have a happier developer community. I have, since WinForms days, distributed my application via a WiX-generated MSI. I have too many things in my WiX bundle to bundle up in an MSIX bundle.

I have found on multiple occasions that when the project file is modified manually something happens and suddenly the code-behind files are not bound to their xaml pages. I have had to rebuild from scratch the entire solution to get around this annoying bug. I reported this issue, #23805, the other day and that is not what this issue is about, but it is related.

When I run an unpackaged build from the publish folder, the icons do not show up as they should. Again, I thought this was fixed, but it is not.

Here is the app when launched from Visual Studio:

Screenshot 2024-07-26 094215

Here is the same app when launched from the publish folder:

Screenshot 2024-07-26 094346

How are we supposed to be successful with our products if you, Microsoft/Maui Team, are not successful with your product? If I am missing something, please enlighten me...

Steps to Reproduce

Just create an unpackaged app with a mixture of png, font awsome icons, and svg files. You will instantly see!

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

It has NEVER worked...

Last version that worked well

8.0.3 GA

Affected platforms

Windows

Affected platform versions

net8.0-windows10.0.19041.0

Did you find any workaround?

Yes. Create a packaged app, extract using unzip the MSIX file and get the components to include in my WiX installer. What a PITA!

Relevant log output

I see a raft full of errors similar to these (formatted with NLog)

----------------------------------
2024-07-26 09:21:46.0588 WARN  
  Call site:         FontImageSourceService.GetImageSourceAsync
  Method name:       Microsoft.Maui.FontImageSourceService.GetImageSourceAsync
  Line:              0
  Exception Type:    System.InvalidOperationException
  Exception Message: This operation is not supported for a relative URI.
  Stack Trace:       at System.Uri.get_AbsolutePath()
   at Microsoft.Maui.FontImageSourceService.GetFontSource(IFontImageSource imageSource)
   at Microsoft.Maui.FontImageSourceService.RenderImageSource(IFontImageSource imageSource, Single scale)
   at Microsoft.Maui.FontImageSourceService.GetImageSourceAsync(IFontImageSource imageSource, Single scale, CancellationToken cancellationToken)
  Additional Info:   Unable to generate font image ''.
----------------------------------

and

----------------------------------
2024-07-26 09:21:46.0817 ERROR 
  Call site:         FontImageSourceService.GetImageSourceAsync
  Method name:       Microsoft.Maui.FontImageSourceService.GetImageSourceAsync
  Line:              0
  Exception Type:    System.InvalidOperationException
  Exception Message: This operation is not supported for a relative URI.
  Stack Trace:       at System.Uri.get_AbsolutePath()
   at Microsoft.Maui.FontImageSourceService.GetFontSource(IFontImageSource imageSource)
   at Microsoft.Maui.FontImageSourceService.RenderImageSource(IFontImageSource imageSource, Single scale)
   at Microsoft.Maui.FontImageSourceService.GetImageSourceAsync(IFontImageSource imageSource, Single scale, CancellationToken cancellationToken)
  Additional Info:   An error occurred
----------------------------------
@mobynet1 mobynet1 added the t/bug Something isn't working label Jul 26, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jfversluis jfversluis added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label Jul 27, 2024
@MartyIX
Copy link
Contributor

MartyIX commented Jul 29, 2024

Kind of hesitate to suggest it but IMHO it should be fairly easy for you to debug this yourself using MAUI's sandbox project:

https://github.com/dotnet/maui/pull/22646/files#diff-e382f4e10273b69c6d437c0905004604ed150e9c4b359f70c6501169567907b8 might be relevant here.

@mobynet1
Copy link
Author

@MartyIX you probably should have hesitated... This is a Maui and/or Telerik internals issue. I'm not going to debug their code...

@MartyIX
Copy link
Contributor

MartyIX commented Jul 30, 2024

Let's wait then :)

@PureWeen PureWeen added this to the .NET 8 SR8 milestone Aug 1, 2024
@hlbmallo
Copy link

hlbmallo commented Aug 2, 2024

Having a similar problem here that is blocking me from releasing the next version of my app, so I feel the frustration. Despite building, packing and bundling the different versions of my app for Windows using the latest stable version of .NET MAUI, the fonts and, crucially, the bundled images and icons, regardless of their Build Action, don't appear when the app is released and installed via a Test Flight through the Store. Hope a fix can be released soon.

@mobynet1
Copy link
Author

mobynet1 commented Aug 3, 2024

I finally made the decision to pull the plug on Maui. I sent the Maui team's product manager a direct email asking for help, even if I paid for it, and after two weeks, still no response. There are issues that I raised over a year ago that are still not resolved, and I can't continue to wait. I have transitioned to the Uno Platform in less than a week and am very pleased not only with the quality of the framework itself, but also by the rapid response I get from their development team. I have raised several issues that they addressed and will be released in their next release. That is the response we all should expect.

@PureWeen PureWeen modified the milestones: .NET 8 SR8, .NET 8 SR9 Aug 6, 2024
@MagicAndre1981
Copy link
Contributor

#23787 was just merged which enables unpackaged apps by default for .net9 when you create new projects. So I assume unpackaged apps work since .net9

@mattleibow
Copy link
Member

Unpackaged should be working. I tried now with the latest stable VS and .NET MAUI 8.0.72 and I cannot reproduce the issue.

MauiApp9.zip

  1. Ran dotnet publish -f net8.0-windows10.0.19041.0
  2. Zipped up the publish folder bin\Release\net8.0-windows10.0.19041.0\win10-x64\publish
  3. Deleted the whole source project
  4. Extracted the published up to a new location
  5. Ran the app from the .exe file in Windows Explorer

This was the outcome. Notice the 3 calendar icons. On is a font in a label, one is an image with the font image source and the other is a button with a font image source:

image

@mattleibow mattleibow added the s/needs-repro Attach a solution or code which reproduces the issue label Aug 19, 2024
@mattleibow
Copy link
Member

Maybe there is an issue with the font filename, the alias provided or something. If this is happening to you (or anyone) then is it possible to attach a project where this is failing. There is also mention of a release app published... Does it work in debug? How are you publishing? What is your full CLI command?

@PureWeen PureWeen added the s/needs-info Issue needs more info from the author label Aug 19, 2024
@PureWeen
Copy link
Member

Can you also try on the latest version of MAUI?

@mattleibow mattleibow added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Aug 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Aug 26, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR9, Backlog Aug 27, 2024
@mobynet1
Copy link
Author

I don't have time to debug this issue any longer. I have decided to pull the plug on Maui and have switched entirely to the Uno Platform. I have complained about this issue for over a year and a half and it's time to move on.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity labels Aug 29, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants