Open Closed

Maui Suggestions With .net 9 #8569


User avatar
0
cangunaydin created
  • ABP Framework version: v9.0.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, I realized that maui template is still using Microsoft.Windows.CsWin32 nuget package for msix. As i know you can debug it without msix by giving property <WindowsPackageType>None</WindowsPackageType>

and if you do that with the startup project you are getting winrt exception. And you can not load the fonts that comes from UraniumUI.Icons package. It throws an error. it can not load the fonts that comes with it. To generate the error you can uncheck the "Create MSIX Package" and try to debug it.

so to create msix packages you do not need to depend on Microsoft.Windows.CsWin32 anymore. Just giving <WindowsPackageType>None</WindowsPackageType> and changing launchsettings.json file is enough with the values here.

{
  "profiles": {
    "Windows Machine": {
      "commandName": "MsixPackage",
      "nativeDebugging": false
    }
  }
}

by the way do not try to debug with jetbrains rider ide for msix package. I suppose it has a bug when you try to debug it, it always throws an error.

Another thing i have found is. When i create mobile solution with abp studio. It saves wrong port and url for openiddict into the db while it seeds for mobile app. So you can not log in from mobile app since port was different.

initial values that i have tried with abp studio was mvc, efcore (postgresql) with mobile support tiered.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Thanks. I will check and fix that.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    When i create mobile solution with abp studio. It saves wrong port and url for openiddict into the db while it seeds for mobile app. So you can not log in from mobile app since port was different.

    Can you share some screenshots?

    Thanks.

  • User Avatar
    0
    cangunaydin created

    Hello, Ok here is some snapshots. When i create the project with abp studio default it comes with those appsettings for dbmigrator.

    as you can see maui app is pointing out to 44331. launchsettings for web app is 44329 instead.

    i have seen that i have written tiered but it wasn't apparently as i see it now. when i run the maui app for windows i got

    just a note i am not so sure now if i selected tiered or not while creating the project from abpstudio. Just maybe i selected tiered but abpstudio created non-tiered project that could be the bug also. But when i look at the abpstudio.sln file here is the config.

      "creatingStudioConfiguration": {
        "template": "app",
        "createdAbpStudioVersion": "0.9.18",
        "tiered": "false",
        "multiTenancy": "true",
        "includeTests": "true",
        "uiFramework": "mvc",
        "databaseProvider": "ef",
        "databaseManagementSystem": "postgresql",
        "separateTenantSchema": "false",
        "theme": "leptonx",
        "themeStyle": "system",
        "mobileFramework": "maui",
        "publicWebsite": "false",
        "optionalModules": "GDPR TextTemplateManagement LanguageManagement AuditLogging OpenIddictAdmin",
        "socialLogin": ""
      }
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. I will check the port!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will fix the port problem in 0.9.20

    Thanks

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi

    I realized that maui template is still using Microsoft.Windows.CsWin32 nuget package for msix. As i know you can debug it without msix by giving property

    This Microsoft.Windows.CsWin32 was used as a workaround for a bug in openning browser while user clicks to login buttpn. https://github.com/microsoft/WindowsAppSDK/issues/441

    When this problem is resolved, we'll remove that package from templates. So, a regular MAUI application shouldn't have that pacakge by default. You can think about it's an msix app and you should develop like it is. Otherwise you can face some other MAUI issues too

Made with ❤️ on ABP v9.1.0-preview. Updated on January 02, 2025, 07:06