简体   繁体   中英

How do I install two versions of my metro app?

I have a project that has various branches of the same C#/xaml metro app. I have a tablet PC that I test the apps on, and I will typically do an app package deployment on it to test out my latest code. The issue that comes up is I often have multiple branches of the same program. I'd like to be able to execute both of them (to compare and contrast) on the tablet computer. However when I go to install the app, it says it's already installed, and the installation fails. What settings do I need to change on my branch so windows 8 sees the branch as a separate app?

I'd try creating two projects with the same name but in different parent folders and doing a diff on the project directories. There must be an ID of sorts that you could find that way.

*EDIT (adding the answer) Comparing the csproj files I can see different project GUIDs:

<ProjectGuid>{2BC8E996-5E25-4714-9327-930553131C04}</ProjectGuid>
<ProjectGuid>{DFC50C25-399E-437A-B641-E48FEA776EFE}</ProjectGuid>

But the other difference is what must make the packaged apps different - in Package.appxmanifest I get different GUIDs as well:

<Identity Name="3b69e4ca-4072-4ec6-8790-4090bf72a8c3"
<Identity Name="2a943b24-68d2-4480-a475-1d606e546672"

Changing that guid should help.

You should be able to add a branch ID to package name, and then that would be a different package.

This is no good for final deployment, but should work if you have a developer license installed.

So

  • company.applicationname

vs

  • company.applicationname-branch1

  • company.applicationname-branch2

should be seen as different packages, and thus allow you to have both installed.

>What settings do I need to change on my branch so windows 8 sees the branch as a separate app?

Your package's NAME in your AppxManifest.xml is the key. To use XPath-speak, a user can only have one package installed per /Package/Identity[@Name] - that's the unique part.

[And Name+Publisher is significant; if Name=X,Publisher=Y is installed and you try to install Name=X,Publisher=Z you'll get an error]

I believe Visual Studio appends ".Debug" and ".Release" to the name if it's controlling the name, so you can F5 multiple configurations. [That has its own issues, eg if you use Notifications, which need to match the name...]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM