RensV
RensV

Reputation: 47

Unity build misses "Publish" option in Visual Studio 2022, forcing publish by including Package.appxmanifest generates "Error: APPX1502"

I am making a HoloLens 2 application using Unity 2021.3.28f1 and MRTK 2.8.3.0.

When I build my Unity UWP (IL2CPP) application with the following settings:

unity build settings

The Visual Studio project that is generated does not recognise the included Package.appxmanifest.
This results in the "Create App Packages..." button missing in the right-click menu and being greyed out under "Project>Publish>Create App Packages...".
When I manually add the Package.appxmanifest, the option returns but the build fails with:

"error APPX1502: The project contains 2 items that represent the app manifest: Package.appxmanifest, C:\...\Package.appxmanifest. The project can contain only one app manifest. Done building project "project.vcxproj" -- FAILED."

I have tried opening the project.vcxproj file with vscode to check any duplicate mentions of the appxmanifest, I suspected that a duplicate mention could be found in this file but there weren't any duplicates.

Can anyone point me in the right direction of what is causing this issue and a potential fix?

Upvotes: 2

Views: 329

Answers (1)

Atul Vasudev A
Atul Vasudev A

Reputation: 463

It is reported as a bug in Unity forum, there is also a work around mentioned

Unity forum bug reported link

In short dragging and dropping package.appxmanifest from Unity Data to UWP project fixes issue as of now.

enter image description here

Upvotes: 0

Related Questions