Mixedrealitytoolkit-unity: Project build failed with scripting backend IL2CPP

Created on 27 Jun 2019  路  4Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

BaiduShurufa_2019-6-27_11-41-41

BaiduShurufa_2019-6-27_11-43-5

IOException: Win32 IO returned 234. Path: C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd" or "Temp\StagingArea\Data\Managed\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd
System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
PostProcessUAPIl2Cpp.CopyFrameworkAssemblies () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPIl2Cpp.cs:339)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:160)
UnityEditor.WSA.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:122)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

To reproduce

1 Create new project
2 Import "Microsoft.MixedReality.Toolkit.Unity.Foundation-v2.0.0-RC2.1.unitypackage" and "Microsoft.MixedReality.Toolkit.Unity.Examples-v2.0.0-RC2.1.unitypackage"
3 Switch platform to Universal Windows Platform
4 Import TMP Essentials. Add HandInteractionExamples.unity to Scenes In Build .
5 Click Build

Your Setup (please complete the following information)

  • Unity Version 2018.4.2f1
  • MRTK Version v2.0.0 RC2.1

Target Platform (please complete the following information)

  • HoloLens

Additional context

Change Script backend to .NET , then build Succeeded with 8 errors
BaiduShurufa_2019-6-27_12-3-19

Bug

Most helpful comment

web:https://blog.csdn.net/Aiongu/article/details/105304815

This article has solutions:
The problem is that one of the file names of the win10 SDK we downloaded is too long, which is beyond the byte export range set by the unity program. At the beginning, I thought the same as everyone else. After all, it's the source file. You can't change it casually. But because of this problem, I decided to give it a try. I reported the wrong Directory:
C:Program Files (x86)Windows Kits10References10.0.18362.0
The following folder:
鈥揥indows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract
The name of is changed to 1.
Not only does the source file not report an error, but the problem of unable to export is solved perfectly!

All 4 comments

If I don't say a mistake, the bug that you have in .NET backend is a known one, and it is not blocking, you can still build the app package on visual studio.

However it is recommended to use IL2CPP, I cannot help you but you can try to delete the Temp and Library folder, re-open Unity as administrator then try again the build. If you get the same error as the one in .NET backend, it succeeded and you can build in Visual Studio.

Deleting Library folders still build failed. And I found this [IL2CPP][UWP] Strange Error: "IOException: Win32 IO returned 234". It's very strange that the file path is too long in default install path.

I want to reinstall Windows SDK in a short path. But I can't chose Install Path after uninstall Visual Studio and all windows SDK and reboot.

BaiduShurufa_2019-6-28_17-59-38

It seems that this problem is not caused by MRTK. I will close this issue.

Have you solved this problem, I also encountered the same problem

web:https://blog.csdn.net/Aiongu/article/details/105304815

This article has solutions:
The problem is that one of the file names of the win10 SDK we downloaded is too long, which is beyond the byte export range set by the unity program. At the beginning, I thought the same as everyone else. After all, it's the source file. You can't change it casually. But because of this problem, I decided to give it a try. I reported the wrong Directory:
C:Program Files (x86)Windows Kits10References10.0.18362.0
The following folder:
鈥揥indows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract
The name of is changed to 1.
Not only does the source file not report an error, but the problem of unable to export is solved perfectly!

Was this page helpful?
0 / 5 - 0 ratings