Error when build with Unity 2021.2.0b12.3482

I build this project (it’s upgraded from 2021.2.0b9) it gets errors.
I also tried build it with 2021.2.0b9 and it gets the same errors.
it can run in editor mode but failed to build.

Scripting Backend : IL2CPP
Api Compatibility Level : .NET Framework

C:\Program Files\Unity\Hub\Editor\2021.2.0b12\Editor\Data\il2cpp\build\deploy\net5.0\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.Burst.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.InputSystem.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.Mathematics.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.RenderPipeline.Universal.ShaderLibrary.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.RenderPipelines.Core.Runtime.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.RenderPipelines.Universal.Runtime.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/Unity.TextMeshPro.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.AIModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.AndroidJNIModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.AssetBundleModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.DirectorModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.JSONSerializeModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.ParticleSystemModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.SpriteMaskModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.TerrainModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UnityAnalyticsModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.UnityWebRequestModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.VFXModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.VideoModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped/UnityEngine.XRModule.dll --data-folder=C:/Users/Admin/Desktop/Story of Nararale/Library/Bee/artifacts/WinPlayerBuildProgram/il2cppOutput/data --generatedcppdir=C:/Users/Admin/Desktop/Story of Nararale/Library/Bee/artifacts/WinPlayerBuildProgram/il2cppOutput/cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile=unityaot-win32 --profiler-report --profiler-output-file=C:/Users/Admin/Desktop/Story of Nararale/Library/Bee/artifacts/il2cpp_conv_vcef.traceevents --print-command-line
Error: IL2CPP error for method ‘System.Void UnityEngine.Color::.ctor(System.Single,System.Single,System.Single,System.Single)’ in C:/buildslave/unity/build/Runtime/Export/Math/Color.cs:38
System.ArgumentException: An item with the same key has already been added. Key: Matrix4x4_get_identity_m94A09872C449C26863FF10D0FDF87842D91BECD6UnityEngine_MetadataUsageId
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage) at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose() at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data)
at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) Error: IL2CPP error for method 'System.Single UnityEngine.Vector3::Magnitude(UnityEngine.Vector3)' in C:/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:379 System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m009B92B5D35AB02BD1610C2E1ACCE7C9CF964A6EUnityEngine_MetadataUsageId at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for method ‘UnityEngine.Vector3 UnityEngine.Vector3::get_zero()’ in C:/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:421
System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m009B92B5D35AB02BD1610C2E1ACCE7C9CF964A6EUnityEngine_MetadataUsageId
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage) at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose() at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data)
at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector4::hushed:p_Equality(UnityEngine.Vector4,UnityEngine.Vector4)' in C:/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:278 System.ArgumentException: An item with the same key has already been added. Key: Mathf_Approximately_m1C8DD0BB6A2D22A7DCF09AD7F8EE9ABD12D3F620UnityEngine_MetadataUsageId at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for method ‘System.Int32 UnityEngine.Vector4::GetHashCode()’ in C:/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:147
System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m9D7F7B580B5A276411267E96AA3425736D9BDC83UnityEngine_MetadataUsageId
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage) at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose() at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data)
at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) Error: IL2CPP error for method 'System.Void UnityEngine.Vector4::.ctor(System.Single,System.Single,System.Single,System.Single)' in C:/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:65 System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m009B92B5D35AB02BD1610C2E1ACCE7C9CF964A6EUnityEngine_MetadataUsageId at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
Error: IL2CPP error for method ‘System.Boolean UnityEngine.Quaternion::IsEqualUsingDot(System.Single)’ in C:/buildslave/unity/build/Runtime/Export/Math/Quaternion.cs:121
System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m009B92B5D35AB02BD1610C2E1ACCE7C9CF964A6EUnity_MetadataUsageId
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage) at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose() at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data)
at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::get_zero()' in C:/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:421 System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m9D7F7B580B5A276411267E96AA3425736D9BDC83Unity_MetadataUsageId at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data)
UnityEditor.GenericMenu:CatchMenu (object,string[ ],int)

1 Like

Can you report a bug on this?

1 Like

Hi ! thanks for the response, I submitted a bug report.

Seems like visual studio 2019 16.11.3 is not working properly with unity now.
Note that I just got my new pc this day and install everything flesh along with unity 2021.2.0b12.3482
Or maybe that caused the problems ?

Edited
Oh I tried this Intellisense Not Working with Visual Studio (Fix)
and visual studio works properly now.

Which issue are you running into? There are two discussed in this thread. And then you also posted “same” in another thread that discusses yet another issue.