UWP Build failed

Hi,

I get the following error when I compile my project for UWP.

Exception: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
Annotation: IL2CPP_CodeGen C:/Dev/Games/Windows/ChallengeAccepted/Library/Il2cppBuildCache/UWP/x86/buildstate/artifacts/il2cpp_conv_bedi.traceevents
Cmdline: “C:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe” --convert-to-cpp --directory=“C:/Dev/Games/Windows/ChallengeAccepted/Temp/StagingArea/Data/Managed” --data-folder=“C:\Dev\Games\Windows\ChallengeAccepted\Library\Il2cppBuildCache\UWP\x86\il2cppOutput\Data” --generatedcppdir=“C:/Dev/Games/Windows/ChallengeAccepted/Library/Il2cppBuildCache/UWP/x86/il2cppOutput” --symbols-folder=“C:\Dev\Games\Windows\ChallengeAccepted\Library\Il2cppBuildCache\UWP\x86\il2cppOutput\Symbols” --emit-null-checks --enable-array-bounds-check --code-generation-option=EnableInlining --stats-output-dir=“C:/Dev/Games/Windows/ChallengeAccepted/Library/Il2cppBuildCache/UWP/x86/il2cppStats” --dotnetprofile=unityaot-win32 --cachedirectory=“C:/Dev/Games/Windows/ChallengeAccepted/Library/Il2cppBuildCache/UWP/x86” --profiler-report --profiler-output-file=“C:/Dev/Games/Windows/ChallengeAccepted/Library/Il2cppBuildCache/UWP/x86/buildstate/artifacts/il2cpp_conv_bedi.traceevents”
ExitCode: -1
Stdout:
Error: IL2CPP error for type ‘VungleSDKProxy.DisplayOrientations’ in assembly ‘C:\Dev\Games\Windows\ChallengeAccepted\Temp\StagingArea\Data\Managed\VungleSDKProxy.winmd’
System.InvalidOperationException: Attempted to lookup type that hasn’t been created. FieldKey: VungleSDKProxy.DisplayOrientations.value__
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.ThrowFailedLookup[TKey](TKey elementType)
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.GetOrAdd[TKey,TDataModel](Dictionary2 mapping, TKey elementType, IMemberStoreCreateCallbacks2 callbacks)
at Unity.IL2CPP.DataModel.Creation.FullyConstructedTypeFactory.CreateFieldReference(TypeReference declaringType, FieldReference fieldReference)
at Unity.IL2CPP.TypeDefinitionWriter.MakeFieldWriteInstructionsForType(ReadOnlyContext context, TypeReference type, TypeDefinition typeDefinition, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteFieldsWithAccessors(ReadOnlyContext context, IReadOnlyContextGeneratedCodeWriter writer, TypeReference type, Boolean isUnmanagedType, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteTypeDefinitionFor(ReadOnlyContext context, TypeReference type, IReadOnlyContextGeneratedCodeWriter writer, TypeReference[ ]& typesRequiringInteropGuids)
at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.BuildCacheData(ReadOnlyContext context, TypeReference type)
at Unity.IL2CPP.DataModel.TypeReference.Unity.IL2CPP.DataModel.InjectedInitialize.ITypeReferenceInjectedInitialize.GetCppDeclarationsData[TContext](TContext context, Func3 initialize) at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.GetCppDeclarations(ReadOnlyContext context, ITypeReferenceInjectedInitialize type) at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.CollectDeclarations(SourceWritingContext context, ICppDeclarations declarationsIn, CppDeclarations& declarations)
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.Write(SourceWritingContext context, ICodeStream writer, ICppDeclarations declarationsIn, Boolean addInteropGuids)
at Unity.IL2CPP.CodeWriters.GeneratedCodeSourceCodeWriter.Dispose()
at Unity.IL2CPP.TableWriters.WriteCompilerCalculateFieldValues.WriteChunkedFile(WorkItemData3 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for type ‘VungleSDK.DiagnosticLogLevel’ in assembly ‘C:\Dev\Games\Windows\ChallengeAccepted\Temp\StagingArea\Data\Managed\VungleSDK.winmd’
System.InvalidOperationException: Attempted to lookup type that hasn’t been created. FieldKey: VungleSDK.DiagnosticLogLevel.value__
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.ThrowFailedLookup[TKey](TKey elementType)
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.GetOrAdd[TKey,TDataModel](Dictionary2 mapping, TKey elementType, IMemberStoreCreateCallbacks2 callbacks)
at Unity.IL2CPP.DataModel.Creation.FullyConstructedTypeFactory.CreateFieldReference(TypeReference declaringType, FieldReference fieldReference)
at Unity.IL2CPP.TypeDefinitionWriter.MakeFieldWriteInstructionsForType(ReadOnlyContext context, TypeReference type, TypeDefinition typeDefinition, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteFieldsWithAccessors(ReadOnlyContext context, IReadOnlyContextGeneratedCodeWriter writer, TypeReference type, Boolean isUnmanagedType, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteTypeDefinitionFor(ReadOnlyContext context, TypeReference type, IReadOnlyContextGeneratedCodeWriter writer, TypeReference[ ]& typesRequiringInteropGuids)
at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.BuildCacheData(ReadOnlyContext context, TypeReference type)
at Unity.IL2CPP.DataModel.TypeReference.Unity.IL2CPP.DataModel.InjectedInitialize.ITypeReferenceInjectedInitialize.GetCppDeclarationsData[TContext](TContext context, Func3 initialize) at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.GetCppDeclarations(ReadOnlyContext context, ITypeReferenceInjectedInitialize type) at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.CollectDeclarations(SourceWritingContext context, ICppDeclarations declarationsIn, CppDeclarations& declarations)
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.Write(SourceWritingContext context, ICodeStream writer, ICppDeclarations declarationsIn, Boolean addInteropGuids)
at Unity.IL2CPP.CodeWriters.GeneratedCodeSourceCodeWriter.Dispose()
at Unity.IL2CPP.TableWriters.WriteCompilerCalculateTypeValues.WriteChunkedFile(WorkItemData3 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for type ‘VungleSDKProxy.DisplayOrientations’ in assembly ‘C:\Dev\Games\Windows\ChallengeAccepted\Temp\StagingArea\Data\Managed\VungleSDKProxy.winmd’
System.InvalidOperationException: Attempted to lookup type that hasn’t been created. FieldKey: VungleSDKProxy.DisplayOrientations.value__
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.ThrowFailedLookup[TKey](TKey elementType)
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.GetOrAdd[TKey,TDataModel](Dictionary2 mapping, TKey elementType, IMemberStoreCreateCallbacks2 callbacks)
at Unity.IL2CPP.DataModel.Creation.FullyConstructedTypeFactory.CreateFieldReference(TypeReference declaringType, FieldReference fieldReference)
at Unity.IL2CPP.TypeDefinitionWriter.MakeFieldWriteInstructionsForType(ReadOnlyContext context, TypeReference type, TypeDefinition typeDefinition, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteFieldsWithAccessors(ReadOnlyContext context, IReadOnlyContextGeneratedCodeWriter writer, TypeReference type, Boolean isUnmanagedType, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteTypeDefinitionFor(ReadOnlyContext context, TypeReference type, IReadOnlyContextGeneratedCodeWriter writer, TypeReference[ ]& typesRequiringInteropGuids)
at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.BuildCacheData(ReadOnlyContext context, TypeReference type)
at Unity.IL2CPP.DataModel.TypeReference.Unity.IL2CPP.DataModel.InjectedInitialize.ITypeReferenceInjectedInitialize.GetCppDeclarationsData[TContext](TContext context, Func3 initialize) at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.GetCppDeclarations(ReadOnlyContext context, ITypeReferenceInjectedInitialize type) at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.CollectDeclarations(SourceWritingContext context, ICppDeclarations declarationsIn, CppDeclarations& declarations)
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.Write(SourceWritingContext context, ICodeStream writer, ICppDeclarations declarationsIn, Boolean addInteropGuids)
at Unity.IL2CPP.CodeWriters.GeneratedCodeSourceCodeWriter.Dispose()
at Unity.IL2CPP.TableWriters.WriteCompilerCalculateTypeValues.WriteChunkedFile(WorkItemData3 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for type ‘VungleSDK.DiagnosticLogLevel’ in assembly ‘C:\Dev\Games\Windows\ChallengeAccepted\Temp\StagingArea\Data\Managed\VungleSDK.winmd’
System.InvalidOperationException: Attempted to lookup type that hasn’t been created. FieldKey: VungleSDK.DiagnosticLogLevel.value__
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.ThrowFailedLookup[TKey](TKey elementType)
at Unity.IL2CPP.DataModel.BuildLogic.Repositories.ReadonlyMemberStorageStrategy.GetOrAdd[TKey,TDataModel](Dictionary2 mapping, TKey elementType, IMemberStoreCreateCallbacks2 callbacks)
at Unity.IL2CPP.DataModel.Creation.FullyConstructedTypeFactory.CreateFieldReference(TypeReference declaringType, FieldReference fieldReference)
at Unity.IL2CPP.TypeDefinitionWriter.MakeFieldWriteInstructionsForType(ReadOnlyContext context, TypeReference type, TypeDefinition typeDefinition, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteFieldsWithAccessors(ReadOnlyContext context, IReadOnlyContextGeneratedCodeWriter writer, TypeReference type, Boolean isUnmanagedType, FieldType fieldType)
at Unity.IL2CPP.TypeDefinitionWriter.WriteTypeDefinitionFor(ReadOnlyContext context, TypeReference type, IReadOnlyContextGeneratedCodeWriter writer, TypeReference[ ]& typesRequiringInteropGuids)
at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.BuildCacheData(ReadOnlyContext context, TypeReference type)
at Unity.IL2CPP.DataModel.TypeReference.Unity.IL2CPP.DataModel.InjectedInitialize.ITypeReferenceInjectedInitialize.GetCppDeclarationsData[TContext](TContext context, Func3 initialize) at Unity.IL2CPP.CppDeclarations.CppDeclarationDataModelInitializers.GetCppDeclarations(ReadOnlyContext context, ITypeReferenceInjectedInitialize type) at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.CollectDeclarations(SourceWritingContext context, ICppDeclarations declarationsIn, CppDeclarations& declarations)
at Unity.IL2CPP.CppDeclarations.CppDeclarationsWriter.Write(SourceWritingContext context, ICodeStream writer, ICppDeclarations declarationsIn, Boolean addInteropGuids)
at Unity.IL2CPP.CodeWriters.GeneratedCodeSourceCodeWriter.Dispose()
at Unity.IL2CPP.TableWriters.WriteCompilerCalculateFieldValues.WriteChunkedFile(WorkItemData3 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)

at il2cpp.Program.DoRun(String[ ] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
PostProcessWinRT.RunIL2CPPForProjectBuild () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1904)
PostProcessWinRT.RunIL2CPP () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1873)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:212)
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:86)
Rethrow as BuildFailedException: Exception of type ‘UnityEditor.Build.BuildFailedException’ was thrown.
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:90)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Any ideas?

Thanks
Jus

I created a bug report since I can easily reproduce it.

Case 1390521

Thanks for the bug report! We’ll look into it.