Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7689553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:11:29+00:00 2026-05-31T20:11:29+00:00

We have an Android app built with Mono for Android, and now we have

  • 0

We have an Android app built with Mono for Android, and now we have desire to make a deployable test version for use in acceptance testing. It is important that the production version remains on the device and keeps working. What is the recommended way of creating a test build without causing interference like package name collisions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:11:31+00:00Added an answer on May 31, 2026 at 8:11 pm

    This solution applies to Mono for Android and allows you to change the package name of an application based on build configuration in Visual Studio:

    1. Create a new Build Configuration, Test, for your solution.
    2. Define a new Conditional compilation symbol, TEST, in your project.
    3. Rename your existing AndroidManifest.xml to AndroidManifest-Template.xml
    4. Create two .xslt files in the Properties folder:

      manifest-transform.xslt:

      <?xml version="1.0" ?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output indent="yes" />
        <xsl:template match="@*|node()">
          <xsl:copy>
            <xsl:apply-templates select="@*|node()" />
          </xsl:copy>
        </xsl:template>
        <xsl:template match="/manifest/@package">
          <xsl:attribute name="package">
            <xsl:value-of select="'<your.test.package.name.here>'" />
          </xsl:attribute>
        </xsl:template>
      </xsl:stylesheet>
      

      manifest-copy.xslt:

      <?xml version="1.0" ?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output indent="yes" />
        <xsl:template match="@*|node()">
          <xsl:copy>
            <xsl:apply-templates select="@*|node()" />
          </xsl:copy>
        </xsl:template>
      </xsl:stylesheet>
      
    5. Add two XslTransformation tasks to the BeforeBuild target of your project file:

      <Target Name="BeforeBuild">
        <XslTransformation 
          Condition="'$(Configuration)|$(Platform)' != 'Test|AnyCPU'" 
          XslInputPath="Properties\manifest-copy.xslt" 
          XmlInputPaths="Properties\AndroidManifest-Template.xml" 
          OutputPaths="Properties\AndroidManifest.xml" />
        <XslTransformation 
          Condition="'$(Configuration)|$(Platform)' == 'Test|AnyCPU'" 
          XslInputPath="Properties\manifest-transform.xslt" 
          XmlInputPaths="Properties\AndroidManifest-Template.xml" 
          OutputPaths="Properties\AndroidManifest.xml" />
      </Target>
      
    6. Use the TEST symbol for conditional code:

      #if TEST
          [Application(
              Label = "App Test", 
              Theme = "@style/Theme.App.Test", 
              Icon = "@drawable/ic_launcher_test")]
      #else
          [Application(
              Label = "App", 
              Theme = "@style/Theme.App", 
              Icon = "@drawable/ic_launcher")]
      #endif
      

    You can now switch between test and regular app by changing build config 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a test android app and signed it successfully and then sent
I have built an android app which use Google Map feature. I want my
I have built a test app on android using this cool-ass PhoneGap framework, but
I have the following problem. We have build an app with mono for android.
I built an app and published it for purchase in the Android Market. Now
I have an Android crypto app that's built with Bouncy Castle (actually using Spongy
I have been using phonegap.js with jqm to built a mobile android app. I
I have an Android App with a pre-built SQLite DB packaged with it. However,
I have built a java server app and am trying to get my android
I have an android app which was built on eclipse. What i am currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.