Unity3D2018.3版本不是很稳定,在需要Target SDK Version为10.0.17134和10.0.17763版本时,打包UWP会遇到

IOException: Win32 IO returned 234. Path: C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.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 :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)

的问题,大致就是Unity在打包UWP时需要从windows 10SDK中复制一个文件失败,导致缺失。

上谷歌搜了一下,有一种解决办法就是升级一个小版本在进行打包,有些好使,有些不好使,还有说是需要的那个文件名字太长不能识别。

在这种情况下,我将

C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0

中的文件删掉,从新打包,很完美的就打包出来了,是没错误的。