我正在尝试将我的项目编译到Unity 2017.3.0f3中的UWP。项目在编辑器中工作正常,但在尝试编译构建时,我收到以下错误:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.<GetAllScriptAssembliesForLanguage`1>m__8[CSharpLanguage] (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly a) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:899)
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[UnityEditor.Scripting.ScriptCompilation.ScriptAssembly].MoveNext ()
System.Collections.Generic.List`1[UnityEditor.Scripting.ScriptCompilation.ScriptAssembly].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[UnityEditor.Scripting.ScriptCompilation.ScriptAssembly]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
System.Linq.Enumerable.ToArray[ScriptAssembly] (IEnumerable`1 source)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetAllScriptAssembliesForLanguage[CSharpLanguage] () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:899)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetScriptAssemblyForLanguage[CSharpLanguage] (System.String assemblyNameOrPath) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:906)
UnityEditor.WSA.MetroCompilationExtension.GetCsCompiler (Boolean buildingForEditor, System.String assemblyName) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/MetroCompilationExtension.cs:22)
UnityEditor.Scripting.Compilers.CSharpLanguage.GetCSharpCompiler (BuildTarget targetPlatform, Boolean buildingForEditor, System.String assemblyName) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/CSharpLanguage.cs:31)
UnityEditor.Scripting.Compilers.CSharpLanguage.CreateCompiler (MonoIsland island, Boolean buildingForEditor, BuildTarget targetPlatform, Boolean runUpdater) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/CSharpLanguage.cs:36)
UnityEditor.Scripting.ScriptCompilers.CreateCompilerInstance (MonoIsland island, Boolean buildingForEditor, BuildTarget targetPlatform, Boolean runUpdater) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilers.cs:133)
UnityEditor.Scripting.ScriptCompilation.CompilationTask.QueuePendingAssemblies () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CompilationTask.cs:186)
UnityEditor.Scripting.ScriptCompilation.CompilationTask.Poll () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CompilationTask.cs:137)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings, System.String tempBuildDirectory, EditorScriptCompilationOptions options, .TargetAssembly[]& notCompiledTargetAssemblies) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:706)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (EditorScriptCompilationOptions options, BuildTargetGroup platformGroup, BuildTarget platform) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:584)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<CompileScripts>c__AnonStorey2.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:177)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[Boolean] (System.Func`1 func, Boolean returnValue) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:75)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
我已经安装了所有推荐的VS 2017套餐和一些额外的,但我无法弄清楚缺少什么。第一行包含“CSharpLanguage”这个词,所以我认为它与CSharp,编译器有关吗?
这是什么意思,我在VS 2017中错过了一些套餐吗?如果是的话,哪一个?或者这是因为别的什么?