Hi. I have a project that runs without errors in the editor. But when i try to make a build, it stops compiling at ~15-20% and gives me those errors (horizontal lines are not part of error text, i just thought it would be nice to separate everything visualy):
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AssemblyTypeInfoGenerator.GetFields (Mono.Cecil.TypeDefinition type, Boolean isGenericInstance, System.Collections.Generic.Dictionary`2 genericInstanceTypeMap) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/BuildPipeline/AssemblyTypeInfoGenerator.cs:229)
UnityEditor.AssemblyTypeInfoGenerator.AddType (Mono.Cecil.TypeReference typeRef, System.Collections.Generic.Dictionary`2 genericInstanceTypeMap) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/BuildPipeline/AssemblyTypeInfoGenerator.cs:150)
UnityEditor.AssemblyTypeInfoGenerator.AddBaseType (Mono.Cecil.TypeReference typeRef, System.Collections.Generic.Dictionary`2 genericInstanceTypeMap) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/BuildPipeline/AssemblyTypeInfoGenerator.cs:209)
UnityEditor.AssemblyTypeInfoGenerator.AddType (Mono.Cecil.TypeReference typeRef, System.Collections.Generic.Dictionary`2 genericInstanceTypeMap) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/BuildPipeline/AssemblyTypeInfoGenerator.cs:161)
UnityEditor.AssemblyTypeInfoGenerator.GatherClassInfo () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/BuildPipeline/AssemblyTypeInfoGenerator.cs:302)
UnityEditor.AssemblyHelper.ExtractAssemblyTypeInfo (System.String assemblyPathName) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/AssemblyHelper.cs:262)
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Error building Player because scripts had compiler errors