microsoft / OpenXR-Unity-MixedReality-Samples

Sample Unity projects to demo how to use OpenXR plugin in Unity for HoloLens 2 and Mixed Reality headsets
MIT License
249 stars 71 forks source link

AzureSpatialAnchors.dll | FileNotFoundException Build Error #61

Closed arvinkx closed 2 years ago

arvinkx commented 2 years ago

ASA: 2.11.0 MRTK: 2.7.2 Unity: 2020.3.26f1 AR Foundation: 4.2.2 MR OpenXR Plugin: 1.2.1 OpenXR Plugin: 1.3.1

Trying to build for UWP results in the following error:

FileNotFoundException: Packages/com.microsoft.azure.spatial-anchors-sdk.windows/Plugins/ARM/AzureSpatialAnchors.dll does not exist
System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at <695d1cc93cca45069c528c15c9fdd749>:0)
PostProcessWinRT.CopyFileWithDebugSymbols (System.String source, System.String target, System.Boolean isFileManagedAssembly) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:599)
PostProcessWinRT.CopyPlugins () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:909)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:164)
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:86)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:90)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
yl-msft commented 2 years ago

Have you enabled LFS for Git before clone the repo?

https://github.com/microsoft/OpenXR-Unity-MixedReality-Samples#welcome ⚠️ NOTE : This repository uses Git Large File Storage to store large files, such as Unity packages and images. Please install the latest git-lfs before cloning this repo.

arvinkx commented 2 years ago

@yl-msft I had downloaded it through github.com, cloning with git did resolve that error but now I am getting the following error when running in VS. After successfully exporting out of Unity, when the app runs, it crashes with Unhandled exception at 0x00007FF8122EED58 (GameAssembly.dll) in OpenXR-Unity-ASASample.exe: 0xC0000005: Access violation reading location 0x000000000015000A.

arvinkx commented 2 years ago

After recreating a new project this issue seems to be resolved so it likely had something to do with the specific project and the original issue was that I downloaded the zip rather than git clone