Search Unity

Failing to find AppxManifest.xml

Discussion in 'Windows' started by CyberInteractiveLLC, Aug 2, 2019.

  1. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    307
    Hi!

    I'm trying to build a debug build on my local machine, upon build finishing it will show this error:

    My build is failing everytime with following error:

    Code (CSharp):
    1. System.IO.DirectoryNotFoundException: Could not find a part of the path '...........\build\bin\x64\Debug\AppX\AppxManifest.xml
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    What/how are you building? Can you paste the full output?
     
  3. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    307
    Hey i'm trying to build a Universal Windows Platform (UWP) project from Unity, the build fails with the following errors:

    Code (CSharp):
    1. BuildFailedException: Deployment failed. Output:
    2. System.IO.DirectoryNotFoundException: Could not find a part of the path 'G:\Unity\Projects\MATRIX UWP\Project\DRIFT MATRIX\Build\TestBuilds\TestBuild1\build\bin\x64\Debug\AppX\AppxManifest.xml'.
    3.  
    4.    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    5.  
    6.    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    7.  
    8.    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
    9.  
    10.    at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
    11.  
    12.    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
    13.  
    14.    at System.Xml.XmlTextReaderImpl.FinishInitUriString()
    15.  
    16.    at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
    17.  
    18.    at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
    19.  
    20.    at WindowsPhonePlayerRunner.AppxManifest..ctor(String appxPath) in C:\buildslave\unity\build\PlatformDependent\MetroPlayer\WindowsPhonePlayerRunner\WindowsPhonePlayerRunner\AppxManifest.cs:line 58
    21.  
    22.    at WindowsPhonePlayerRunner.AppxManifest.Get(String appxPath) in C:\buildslave\unity\build\PlatformDependent\MetroPlayer\WindowsPhonePlayerRunner\WindowsPhonePlayerRunner\AppxManifest.cs:line 39
    23.  
    24.    at UWPPlayerLauncher.Program.Run(ProgramArguments arguments) in C:\buildslave\unity\build\PlatformDependent\MetroPlayer\UWPPlayerLauncher\Main.cs:line 131
    25.  
    26.    at UWPPlayerLauncher.Program.Main(String[] args) in C:\buildslave\unity\build\PlatformDependent\MetroPlayer\UWPPlayerLauncher\Main.cs:line 92
    27.  
    28.  
    29. ApplicationLauncherImpl.RunOnLocalMachine (System.String commandLine) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:188)
    30. ApplicationLauncherImpl.Run (Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:152)
    31. ApplicationLauncher.BuildAndRunProject (UnityEditor.Modules.BuildLaunchPlayerArgs args, UnityEditor.WSABuildAndRunDeployTarget deployTarget, System.String platform, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:61)
    32. ApplicationLauncher.BuildAndRun (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:36)
    33. UnityEditor.UWP.BuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:83)
    34. UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:166)
    35. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
    36.  
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Which Unity version are you on? Can you show a screenshot of your Build Window in Unity so I could see which build settings you're using?
     
  5. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    307


    2019.1.0f2
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you by any chance attach your editor log? Something is going wrong - I'm not exactly sure yet.

    Another alternative would be to try pressing "Build" instead of "Build & Run" and see if you encounter any issues when building generated Visual Studio project yourself. And yet another alternative would be to change Build Type to Executable Only (which is actually preferred for iteration types, as it doesn't involve generating intermediate Visual Studio project that needs to be built).
     
    LM3DM likes this.
  7. mrKaizen

    mrKaizen

    Joined:
    Feb 14, 2011
    Posts:
    139
    Had the same problem. You are right, it works PERFECTLY, so tks man! ;)
    I think the error was thrown because I don't have checked "developer mode" on "use developer feature" of windows 10 settings panel - so pressing build is enough, "build and run" can't run the app.
     
  8. Mixxit

    Mixxit

    Joined:
    Aug 28, 2013
    Posts:
    33
    this is happening for me on LTS 2019 and the latest 2020

    It is trying to find the AppXManifest file inside a subfolder called AppX that is not created in the build process

    To reproduce this just create a blank UWP project and try to 'build and run'
     
    Last edited: Jan 17, 2021
    Gorthax likes this.
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can't reproduce. Did you try the suggestions I posted above?
     
  10. LM3DM

    LM3DM

    Joined:
    Apr 21, 2021
    Posts:
    1
    Worked for me as well, thank you so much! :)
     
  11. erik_hyrkas

    erik_hyrkas

    Joined:
    May 8, 2015
    Posts:
    8
    I have Unity Hub 2.4.3. Unity 2020.3.8f1 (LTS) and if I make a blank 2d project and hit "build and run", it works fine -- but I notice that a new project uses the "PC, Mac, and Linux Standalone" build settings. My existing project defaults to "Universal Windows Platform" (I don't believe that I changed that, and I don't remember if there was an option while setting up my project.) I can fix my existing project by switching the build to "PC, Mac, and Linux Standalone" as long as I make sure my architecture is x86.

    However, if I set it to x86_64, I get the same error as the "Universal Windows Platform" build:


    BuildFailedException: Deployment failed.
    Output:System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\ehyrk\bin\build\bin\x64\Release\AppX\AppxManifest.xml'.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
    at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
    at System.Xml.XmlTextReaderImpl.FinishInitUriString()


    The AppX folder doesn't exist. It makes an "exe" file in the Release folder, but the executable doesn't work because of a missing dll.

    I'm not sure why this is happening, but it might help the people above. I find it really interesting that this is happening and I can probably dig into why x86_64 build is failing in a bit.
     
  12. erik_hyrkas

    erik_hyrkas

    Joined:
    May 8, 2015
    Posts:
    8
    Uninstalling and reinstalling Visual Studio with pretty much every option that (in my mind) could plausibly be related installed, I can now build using x86_64 platform for Windows using "PC, Mac & Linux Standalone". I was using the same Visual Studio that I have been using for non-game development C++ and must have been missing something Unity needed. (It isn't clear to me what was missing, since I had most optional packages of Visual Studio already installed, and testing one checkbox at a time wasn't an option since my time is limited.)

    Getting "Universal Windows Platform" build to work was much more difficult. Even though I installed a number of Windows 10 SDKs and messed around with a lot of options, what finally got it to work was sort of silly. I turned on "Developer Mode" in settings:

    upload_2021-5-17_9-13-31.png