Building Errors on new unity version

I just updated unity since a bug i posted wont be backported, and i can find a way of doing a successful player build, any idea on whats going on?, unity 2022.1.0b10

Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2022.1.0b10\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\16461770786374037127.rsp
Fatal error in Unity CIL Linker
Mono.Linker.LinkerFatalErrorException: E:\Projects\Undead Citadel - Unity 2022\Assets\_UCScripts\DarkCurry\General\NPC\Enemies\AI\ArmRaiser.cs(55,3): error IL1005: .ArmRaiser.set_TargetLayerWeight(Single): Error processing method '.ArmRaiser.set_TargetLayerWeight(Single)' in assembly 'DarkCurry.General.dll'
---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Reactive.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null'
at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)
at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type)
at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference)
at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedMethod(MethodReference reference)
at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction, MethodDefinition method, Boolean& requiresReflectionMethodBodyScanner)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
at Unity.Linker.UnityDriver.RunDriver()
UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
Unity.Build.Classic.Private.BuildPlayerStep:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:63)
Unity.Build.BuildStepCollection:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/BuildStepCollection.cs:77)
Unity.Build.Classic.Private.ClassicNonIncrementalPipelineBase:OnBuild (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Classic.Private/NonIncremental/ClassicNonIncrementalPipelineBase.cs:10)
Unity.Build.BuildProcess:Update () (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/BuildProcess.cs:54)
Unity.Build.BuildPipelineBase:Build (Unity.Build.BuildConfiguration,Unity.Build.BuildProgress) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/BuildPipelineBase.cs:84)
Unity.Build.BuildConfiguration:Build () (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/BuildConfiguration.cs:65)
Unity.Build.Editor.BuildConfigurationInspector/<>c:<.cctor>b__34_0 (Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:42)
Unity.Build.Editor.BuildConfigurationInspector/<>c__DisplayClass30_0:<Build>b__1 () (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:128)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I just found the problem
Mono.Linker.LinkerFatalErrorException: E:\Projects\Undead Citadel - Unity 2022\Assets_UCScripts\DarkCurry\General\NPC\Enemies\AI\ArmRaiser.cs(55,3): error IL1005: .ArmRaiser.set_TargetLayerWeight(Single): Error processing method ‘.ArmRaiser.set_TargetLayerWeight(Single)’ in assembly ‘DarkCurry.General.dll’

Seems there is something that has cause a lot of damage to us, that is that now unity recognizes by default System.Reactive

We are using UniRx, and they have also an extension class Called ObservableExtensions
and now unity recognices System.ObservableExtensions by default
causing a clash beween UniRx Subscriptions and System Subscriptions…
thanks god i can change the code of unirx to change the function name…

Hi @Extrys ,

Thanks for flagging this. I have highlighted the thread internally. Could you please submit a bug report for the issue as well?

its already fixed, its just that now the System namespace in unity 2022 has ObsevableExtensions with the same methodnames and parameters than UniRx

im not sure about what to report

Oh @LeonhardP
About the bug i reposted is this which i needed to be backported but i got said that it wont because “stability”
and 2021 is currently unstable because of this

This is why er are forced to use a beta for our release…

I have been investigating
and seems that it is a Unity thing
// C:\Program Files\Unity\Hub\Editor\2022.1.0b11\Editor\Data\UnityReferenceAssemblies\unity-4.8-api\System.Reactive.Core.dll

7954246--1018783--upload_2022-3-10_13-18-5.png

They are all even Empty… so its causing us a big problem with our workflow, since we are using UniRx
7954246--1018786--upload_2022-3-10_13-19-36.png

They have the same methodsnames and the same parameters, and this coulde be easily solved by just adding “.Reactive” to the namespace, since this issue appears whenever we use system
7954246--1018795--upload_2022-3-10_13-22-52.png

i could fix this by recompiling this assembly
7954246--1018798--upload_2022-3-10_13-24-6.png

Thats the main problem

As seems that this “ObservableExtensions” is not ready yet / empty, it wouldnt be a problem for you to add the “.Reactive” or “.Reactive.Core” to that englobing namespace
that would fix our problem

I think this problem is important to be fixed ASAP as this will affect a lot of users using Zenject and UniRx, and the script seems to be in an early phase, so it should be easier the sooner its made

I heard back from the devs. This is a known issue and being looked into: https://issuetracker.unity3d.com/product/unity/issues/guid/1407597/

I’ll have a look.

1 Like

Awesome thanks, have a great day! :smile:

1 Like