Build Configurations to change MAUI Settings like ApplicationId

Tony Pitman 80 Reputation points
2024-07-23T15:33:44.9333333+00:00

We have a MAUI app that I build for iOS and Android. We use this same code base for 5 different apps that talk to different bluetooth hardware we sell.

Each time I switch mobile apps I go into the project properties / App Info and change the Application Title, Application ID and Version values.

I tried manually editing the .csproj file and use the Configuration setting to set up those values in different property groups using the conditions.

I was not able to find a way to select my configurations because the only drop down options that ever showed up on the title bar was Debug and Release.

Is there a "proper" way to do what I am trying to do?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,777 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,369 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 30,416 Reputation points Microsoft Vendor
    2024-07-24T02:27:59.0266667+00:00

    Hello,

    There is no such configuration, you have to edit the APPID and title information manually in the .csproj file, or in the GUI window of the project's property. And what you did is correct.

    	<!-- Display name -->
    <ApplicationTitle>XXX</ApplicationTitle>
     
    	<!-- App Identifier -->
    <ApplicationId>XXX</ApplicationId>
     
    	<!-- Versions -->
    <ApplicationDisplayVersion>XX</ApplicationDisplayVersion>
    <ApplicationVersion>X</ApplicationVersion>
    

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.