Search Unity

Problems creating UWP test package - "Task 'ExpandPriContent' failed"

Discussion in 'Windows' started by lasercannon, Dec 15, 2015.

  1. lasercannon

    lasercannon

    Joined:
    Nov 29, 2012
    Posts:
    80
    Hey all,

    When I try and create a package from Visual Studio, I get the following error:

    2>------ Build started: Project: Oxenfree, Configuration: Master x64 ------
    2> Oxenfree.vcxproj -> C:\Builds\Oxenfree\Windows10-Release\Oxenfree\\..\build\bin\x64\Master\Oxenfree.exe
    2>MakePRI : warning 0xdef00520: Invalid qualifier: DLL-RESOURCES
    2>MakePRI : warning 0xdef00520: Invalid qualifier: DLL-RESOURCES
    2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1381,5): error APPX0002: Task 'ExpandPriContent' failed. Could not find file 'C:\Builds\Oxenfree\Windows10-Release\Oxenfree\build\obj\Oxenfree\x64\Master\split.pri.xml'.
    2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1381,5): error APPX0002:
    ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Any ideas as to what causes this? The game builds fine if I click "Local Machine" but packages seem to fail no matter what settings I choose. Also couldn't find anything on these or other forums regarding "ExpandPriContent" or "Invalid Qualifier: DLL-RESOURCES."

    Thanks,

    Bryant
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,899
    Is there a plugin named split.dll or split.winmd somewhere? But as you, I don't think I've seen this error before.
     
  3. lasercannon

    lasercannon

    Joined:
    Nov 29, 2012
    Posts:
    80
    Nothing in my Unity project called "split". :/ Looks like it's looking for that file though.
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,899
  5. lasercannon

    lasercannon

    Joined:
    Nov 29, 2012
    Posts:
    80
    I was able to get rid of those warnings with the help of that post, but it seems they had nothing to do with the split.pri.xml errors. The only other possibility I've found is that it might have something to do with resource splitting or something?

    When I double-click the error it goes to "Microsoft.AppXPackage.Targets" and highlights the "ExpandPriContent Inputs" line of:


    <!-- Expand content of project PRI file. -->
    <Target Name="_ExpandMainPriFile">

    <ExpandPriContent Inputs="$(AppxBundleSplitResourcesPriPath)"
    MakePriExeFullPath="$(MakePriExeFullPath)"
    MakePriExtensionPath="$(OutOfProcessMakePriExtensionPath)"
    IntermediateDirectory="$(IntermediateOutputPath)"
    AdditionalMakepriExeParameters="$(AppxExpandPriContentAdditionalMakepriExeParameters)"
    >
    <Output TaskParameter="Expanded" ItemName="IndexedMainPayloadFiles" />
    <Output TaskParameter="IntermediateFileWrites" ItemName="FileWrites" />
    </ExpandPriContent>

    </Target>


    Searching the web for most of these terms shows almost nothing. :/

    Really worried about this because our deadline is in January...
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    That is so weird - I've never encountered such error before. I am confident though that we'll find a solution.

    This looks to be related to AppX bundles. When you create an application package, what do you select in this drop down menu? I'd try selecting "Never".



    I'd also double check that the images specified in the manifest match the required sizes.

    Lastly, please check if this happens in an empty project. If changing AppX bundle settings doesn't work, we'll need to look for some other solution, so it would be nice to know if it's something specific to your project or your machine config, or even something totally different.
     
    GarthSmith likes this.
  7. lasercannon

    lasercannon

    Joined:
    Nov 29, 2012
    Posts:
    80
    Ah, setting it to Never seemed to work! Thanks!
     
    GarthSmith likes this.
  8. ColinAmuzo

    ColinAmuzo

    Joined:
    Mar 20, 2013
    Posts:
    46
    Sorry to resurrect this a year later, but I'd really like to use AppX bundles (ie set "Generate app bundle" to "Always"). I'm using Unity 5.3.3f1 currently and I'm getting the build error mentioned by OP. Would updating Unity fix this? If so, what version was the fix in? (I'd rather stay with 5.3, than 5.4.)
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Could you elaborate why want to use AppX bundles for? Does "generate if needed" not work either? We haven't fixed anything related, but I believe this error happens if you try to force the bundle generation even when there's nothing to generate.
     
  10. ColinAmuzo

    ColinAmuzo

    Joined:
    Mar 20, 2013
    Posts:
    46
    We want to use bundles because it is more convenient to have the x86, x64 and arm packages bundled into one package. It is a convenience feature after all.

    Most of the material online relating to UWP packaging suggests selecting "Always"; I think it's a common thing to do.

    I haven't tested "generate if needed", but I assume that (in my scenario) it would not generate the bundle, and therefore the process would succeed.

    When I got the error, there were definitely packages there to bundle.
     
  11. StephenHodgson-Valorem

    StephenHodgson-Valorem

    Joined:
    Mar 8, 2017
    Posts:
    148
    My build is successful, but I'm still curious how to fix the invalid qualifier warnings.

    Code (CSharp):
    1. GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: DLL-RESOURCES
     
  12. burkeda0300

    burkeda0300

    Joined:
    Mar 2, 2017
    Posts:
    7
    I too have the same issue, I get a successful build in Unity and Visual Studio. I get the following error:

    Severity Code Description Project File Line Suppression State
    Warning PRI249 0xdef00520 - Invalid qualifier: DLL-RESOURCES


    I'm currently using:
    Unity 2018.1.3f1
    VRTK 3.3.0a w/Windows MR Extension
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It's a harmless warning. It shouldn't cause any issues as far as we're aware.
     
  14. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
    I seem to be having the same issue on launching the installed app. It builds and installs no problem. Crashes on launching. Only warnings I see during building appx file is below:

    2>GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: DLL-RESOURCES
     
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Did you try debugging it? How does it crash?
     
  16. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
    Yeah debug seems to get caught on the section before the unity splash screen. Here is the line that it throws up after it crashes.
    upload_2018-8-10_14-10-11.png
    Not familiar with where this is at.
     
  17. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
    I am trying to export UWP with lightweight render pipeline. I do not have a pro license so I am not sure if one of those could be a problem.
     
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    The output log seems to have an error just above what you can see in the screenshot (on the bottom right). What does it say? What's the callstack for this crash?
     
  19. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
    I am not sure. I believe it has to do with the render engine that I am using. I am still very new to C#.
     
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    You should start another thread. It is not related to what is being discussed here. And please paste the full log in that post, as otherwise I can't really help.
     
  21. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
  22. nyarsulik

    nyarsulik

    Joined:
    May 7, 2014
    Posts:
    54
    The PRI249 issue is still appearing in 2018.2.14f1. Building packages now, hoping that it won't crash when I transfer it over to Xbox One and run it, but seems to run fine from VS on my computer.

    Update - Game starts to load on Xbox One, I see the splash screens then my initial loading screen, but then it crashes and returns to DevHome. I am not sure how to see error messages from this, I'll try to dig in a see what I can find. Frustrating that it works in VS but not on the Xbox One. Trying to set to "never" create an appbundle and see if that fixes the issue for me as well?
     
    Last edited: Oct 29, 2018
  23. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    That warning cannot cause a crash. Did you try running on Xbox from VS and debugging it?
     
  24. nyarsulik

    nyarsulik

    Joined:
    May 7, 2014
    Posts:
    54
    I'll have to read and find out how to run via VS to Xbox. I have always built the packages and manually transferred them to Xbox via the web portal connection to the xbox to test. Yikes.

    I must be having a different issue that is causing the crash then, just having trouble figuring out what it is.
     
  25. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Go to project properties -> debugging and configure it to run on a remote machine. You'll need to enter Xbox One IP address there. And that's about it - once you click "OK", F5 will run it on your Xbox.
     
  26. nyarsulik

    nyarsulik

    Joined:
    May 7, 2014
    Posts:
    54
    Thanks Tautvydas-Zilys! I'll make a new post and drop from this one, I tried to build everything again and within VS I am still getting a breakpoint but I can't figure out what is causing it.
     
  27. Quantexlda

    Quantexlda

    Joined:
    Nov 7, 2017
    Posts:
    7
    For anyone having issue PRI249 and that fail to bypass it - it looks like that Unity generate reference with name like "DLL-RESSOURCES" or other names that a tool from Microsoft dislike.
    So the solution i found is to rename any file generated from the Unity3D build to a shorter name (ie "anyfile.DLL-RESSOURCES.DAT" to "anyfile.DLLRESS.DAT") and change the reference into the projects files (Unity.Data.vcsitems.*)
    Then open the project into Visual Studio for a build to deploy on the Windows Store.

    That way it do not generate the PRI249 Warning and it got accepted on the Windows Store. For all platforms (even from the ARM).

    Have fun
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Keep in mind that this will break loading resources from managed assemblies.
     
  29. Quantexlda

    Quantexlda

    Joined:
    Nov 7, 2017
    Posts:
    7
    At least it works for me for the integrated dll on use to connect my game, and it allow to deploy the game on the windows store since i update from Unity 2017 to 2020 that generated that issue.
    Anyway it is a Unity-Microsoft issue and on my side it works for the DLL that we added to our game - the resources are properly loaded for non-ARM processor. And that is maybe the point - We need to be able to release...
     
  30. tflorescu

    tflorescu

    Joined:
    Nov 11, 2021
    Posts:
    1
    I am still having this issue today working with Unity 2020 and Visual Studio 2019. Is there any fix available that would solve this without me having to alter the generated project?
     
  31. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you elaborate exactly which error you're getting?