Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity version 2021.3.28f1 lacks the UWP Publish Button in Visual Studio Build for package generation

Discussion in 'Windows' started by nabil_at, Aug 17, 2023.

  1. nabil_at

    nabil_at

    Joined:
    Sep 21, 2022
    Posts:
    3
    We are making a HoloLens 2 application using Unity 2021.3.28f1 and MRTK 2.8.3.0.

    The Visual Studio 2022 (version 17.4.5) 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...".

    This problem happens when using Unity 2021.3.28f1 and is working fine with previous version (Unity 2021.3.18f1).

    PS: The certificate WSATestCertificate.pfx is not expired.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    Can you should a screenshot?
     
  3. nabil_at

    nabil_at

    Joined:
    Sep 21, 2022
    Posts:
    3
    As you can see, the "Create App Package..." button is disabled
    upload_2023-8-18_10-10-55.png
     
    dsarbaev likes this.
  4. rubikCZ

    rubikCZ

    Joined:
    Nov 21, 2020
    Posts:
    4
    I can confirm the same behaviour using Unity 2021.3.29f.
    In my case the issue is related to the location of file "Package.appxmanifest". After the build in Unity and opening the solution in Visual Studio 2022, the file is located not in Project matching app developed in Unity but it is in the node Unity Data. Moving that file under project (UWP) and with selected that project was the creating of app package possible. But every build in Unity creates again the file in Unity Data node. So everytime needed to remove that file and keep only the one in the app node in solution explorer. Hope this helps somehow.

    If file "Package.appxmanifest" is in Unity Data node move it into the
    upload_2023-8-18_19-51-22.png

    Your App name (Universal Windows) node like below:
    upload_2023-8-18_19-52-45.png

    Then the option to create app package is working as expected:
    upload_2023-8-18_19-53-20.png
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    Can either of you file a bug report on this?
     
  6. rubikCZ

    rubikCZ

    Joined:
    Nov 21, 2020
    Posts:
    4
    Done, bug ID: IN-52141.
     
    dsarbaev and yotiky like this.
  7. nabil_at

    nabil_at

    Joined:
    Sep 21, 2022
    Posts:
    3
    Hello Everyone,

    As @rubikCZ said, there is a workaround:
    -1) include this file Package.appxmanifest In [YourUnityProject] by Right Click>Add>Existing Item...-->Package.appxmanifest
    -2) exclude the file from Unity Data project by right Click on file and -> Exclude From Project

    But you have to do this each time Unity generates the solution.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628