Skip to content
Menu
Archicode
  • About me
Archicode
May 9, 2024May 8, 2024

Weird issues with Maui Blazor Hybrid app

Configuration

  • Visual Studio 2022 17.8
  • .NET 8.0
  • Android SDK

Steps

  • Create a new “Maui Blazor Hybrid Solution”
  • Try building the solution

When you try building a Maui Blazor Hybrid Solution, in .NET 8, you might encounter a peculiar issue :

Cannot deploy the solution, please select deploy in the Configuration Manager

And if you click OK afterwards, you can see in the error list that it complains about a .ttf file. In my case OpenSans-Regular.ttf

After searching the web and interrogating Chatgpt and Microsoft Copilot like a Soviet counter intelligence agent, I finally figured it out.

Android doesn’t like “-” in names

The first step was to rename the font file by removing the “-” in the filename. That allowed me to move to the second level.

Correcting the file name got rid of the error in the error list but I got a bunch of them afterwards, which means in software development : you’re moving forward.

The subsequent errors were about splash screen and how Visual Studio couldn’t find the splash.svg.

If you look at the path it’s looking for, you can see that it contains your application name : com.companyname.whatevernameyourapplicationhas. I’m not entirely sure about this one but apparently, the whole package name can only be 50 characters so you need to change it in your android manifest.xml

Moving on to the boss because the last fix still doesn’t allow you to launch your app.

There’s an entry missing in your csproj. That is the most surprising of them all but here it is :

<MauiSplashScreen>

After you add this in your csproj… Tadaa it builds and launches your app.

Happy developing

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How to Deactivate and Reactivate a Plugin in Microsoft Dynamics 365: Resolving the “ProjectOperations_Anchor PackageImportFailed” Error
  • Issue when debugging Azure Function locally
  • Understanding Blazor Component Parameters
  • Error NETSDK1082 in Maui Blazor Hybrid App
  • Understanding @inject in Blazor Components

Recent Comments

  1. Harisinou on Understanding Blazor Component Parameters
  2. ปั้มไลค์ on Encourage your kids to read books
  3. Jamesglalt on How to : Blazor components (basic)
  4. Liza Conable on How to blazorify an existing mvc app
  5. BrianKit on How to : Blazor components (basic)

Archives

  • April 2025
  • May 2024
  • December 2023
  • November 2023
  • October 2023
  • May 2023
  • March 2021
  • August 2020
  • July 2020
  • June 2020
  • October 2019
  • June 2019
  • February 2019

Categories

  • .NET
  • Fixes
  • IoT
  • Misc
  • Uncategorised
  • Uncategorized
©2025 Archicode | Powered by WordPress and Superb Themes!