Once I add the HTK to my project, even if I am not using anything in it, and I try to build for the HoloLens from Unity, it fails with the following errors, however, if I pull the HTK out of my assets folder, it builds just fine. I just tried this with the very latest merged code as of noon on 7/13 and am still seeing the same behavior.
KeyNotFoundException: The given key was not present in the dictionary.
System.ThrowHelper.ThrowKeyNotFoundException () (at:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at:0)
MetroCSharpVisualStudioSolutionCreator.WriteSolutionFile (System.String solutionFileName, UnityEditor.Scripting.ScriptCompilation.ScriptAssembly[] csharpAssemblies) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/MetroCSharpVisualStudioSolutionCreator.cs:166)
MetroCSharpVisualStudioSolutionCreator.CreateSolutionFileFrom () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/MetroCSharpVisualStudioSolutionCreator.cs:716)
PostProcessWSA.CreateVisualStudioSolution () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWSA.cs:320)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:221)
UnityEditor.WSA.BuildPostprocessor.DoPostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:142)
UnityEditor.WSA.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:149)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Second Error
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Final Error
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Confirming that I also have this issue with 2017.2.0b2 and latest HTK
This appears to be a bug in Unity. If the option _Unity C# Projects_ is selected then the build fails with the above errors, however leaving this unchecked allows the build to complete successfully. Closing this issue and opening bug with Unity.
@jessemcculloch Link to the Unity bug ticket?
Possibly this one?
Claims fixed in 2017.3, but I haven't been hitting it in the 2017.2 MRTP builds (I haven't tried regular 2017.2 builds).
Thanks! We hit something with a similar error but turns out it was something else unrelated to the toolkit.
UnityEditor.BuildPlayerWindow + BuildMethodException: Komut dosyalarının düzenleyicide derleme hataları olması nedeniyle Player'ı oluşturma hatası
UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer'da (BuildPlayerOptions seçenekleri) [0x0020e] C: \ buildslave \ birlik \ yapı \ Düzenleyici \ Mono \ BuildPlayerWindowBuildMethods.cs'de:
UnityEditor.BuildPlayerWindow.CallBuildMethods adresinde (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] C: \ buildslave \ birlik \ yapı \ Düzenleyici \ Mono \ BuildPlayerWindowBuildMethods.cs'de: 88
UnityEngine.GUIUtility: ProcessEvent (Int32, IntPtr)
How can I fix the error?
do you know about picture or video
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
bug bug bug
This was a known issue in Unity 2017.2.0b2 when C# Projects was checked during the UWP build (and is unrelated to the Toolkit itself). Should be fixed on non-beta releases. Are you seeing it elsewhere?