1

I have a Xamarin application that is published to an appxbundle package. I have re-created the application in Maui, and that produces an msix package. When I try up update an installation of the Xamarin version with the new Maui version, I get:

"App installation failed with error message: Deployment Add operation with target volume C: on Package MyPackageetcetc from: (MyPackageeetcetc.msix) failed with error 0x80073CF3."

If I do a fresh install of the new version, it installs ok. Also when it installs, it does use the same folder name within C:\Users[username]\AppData\Local\Packages.

I have been unable to produce the Maui versions installation file from Visual Studio's Publish option (I get The specified RuntimeIdentifier 'win10-x86' is not recognized. See https://aka.ms/netsdk1083 for more information. C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets) - so have been using a command line:

dotnet publish MyProject.csproj -f net9.0-windows10.0.19041.0 -c Testing -p:RuntimeIdentifierOverride=win-x64

Within the AppxManifest.xml in the packages, the Identity Name is the same, although I have ProcessorArchitecture="x64" in the Maui installer, presumably that isn't going to stop it updating?

Any help would be much appreciated!

4
  • Have you checked the netsdk1083? Seems you use 'win10-x86 in VS publish while you use win-x64 in command line? Commented Jan 16 at 2:31
  • Hi @LiqunShen-MSFT - I have changed the RuntimeIdentifier in the PublishProfile to "win-x64", but that gives me other errors regarding referenced projects such as (project.assets.json doesn't have a target for 'netstandard2.0' - but that project does have <TargetFramework>netstandard2.0</TargetFramework> specified.... Commented Jan 16 at 13:21
  • Are you trying to override a store deployed package with a dev signed package? Have you used the latest Visual Studio and .NET version? Commented Jan 20 at 2:20
  • @LiqunShen-MSFT Thanks for your assistance, yep I was using the same certificate, and also same Application Id. I have managed to find the answers to both my issues, I've added an answer below! :-) Commented Jan 21 at 9:24

1 Answer 1

0

There are two issues: The error when I try and Publish from Visual Studio. This appears to be a bug due to my Maui project referencing netstandard2 - see: https://github.com/dotnet/maui/issues/26485

To get around the above, I built using a command-line, but, as described above, the msix package would not update the existing appxbundle. This also appears to be a bug.

This describes the same symptoms: https://github.com/dotnet/maui/discussions/13505

and following linkds from that page led me to here: https://github.com/dotnet/maui/issues/12327

which led me to this file: https://gist.github.com/mattleibow/8332ed79b569c9d7bbdae64a6e8142a6#file-microsoft-build-msix-packaging-msixbundle-targets

follow the instructions in the comments of the above file - basically add that file to your project, add an Import in your project file that points to it, and then use a command-line such as:

dotnet build /t:GenerateMsixBundle -f net7.0-windows10.0.19041.0 <path/to/app.csproj>

and that works! I can update my old app (Xamarin, packaged in an appx bundle) with my new Maui app (packaged in a msix bundle). Phew. That all was really hard work to get to that point, but hopefully someone with the same issues might stumble across this and it helps them! And well done to mattleibow on GitHub for the solution!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.