Assembly-CSharp.DLL not generating, but only on one machine

I have a branch updating my current project to 2022.3, and it worked out with no problems on one machine, but on another, when trying to open this branch with the 2022.3, I get an error that as far as I can tell, isn’t pointing at a problem with my code or any of my third party code. Here is the entirety of the error report:

Processing assembly Library/Bee/artifacts/1900b0aE.dag/Assembly-CSharp.dll, with 116 defines and 294 references
processors: Unity.Entities.CodeGen.EntitiesILPostProcessors, Unity.Jobs.CodeGen.JobsILPostProcessor, zzzUnity.Burst.CodeGen.BurstILPostProcessor
running Unity.Entities.CodeGen.EntitiesILPostProcessors
running Unity.Jobs.CodeGen.JobsILPostProcessor
Unity.Jobs.CodeGen.JobsILPostProcessor: ILPostProcessor has thrown an exception: System.ArgumentNullException: Value cannot be null. (Parameter 'fieldType')
   at Mono.Cecil.Mixin.CheckType(Object type, Argument argument)
   at Mono.Cecil.FieldReference..ctor(String name, TypeReference fieldType)
   at Mono.Cecil.MetadataReader.ReadField(UInt32 field_rid, Collection`1 fields)
   at Mono.Cecil.MetadataReader.ReadFields(TypeDefinition type)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   at Mono.Cecil.TypeDefinition.get_Fields()
   at Mono.Cecil.ImmediateModuleReader.ReadFields(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
   at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
   at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module, Boolean resolve_attributes)
   at Mono.Cecil.ModuleDefinition.Read[TItem](TItem item, Action`2 read)
   at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
   at Unity.Jobs.CodeGen.JobsILPostProcessor.AssemblyDefinitionFor(ICompiledAssembly compiledAssembly)
   at Unity.Jobs.CodeGen.JobsILPostProcessor.Process(ICompiledAssembly compiledAssembly)
   at Unity.ILPP.Runner.PostProcessingPipeline.PostProcessAssemblyAsync(PostProcessAssemblyRequest request, Action`2 progressSink)
PostProcessing failed: System.ArgumentNullException: Value cannot be null. (Parameter 'fieldType')
   at Mono.Cecil.Mixin.CheckType(Object type, Argument argument)
   at Mono.Cecil.FieldReference..ctor(String name, TypeReference fieldType)
   at Mono.Cecil.MetadataReader.ReadField(UInt32 field_rid, Collection`1 fields)
   at Mono.Cecil.MetadataReader.ReadFields(TypeDefinition type)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   at Mono.Cecil.TypeDefinition.get_Fields()
   at Mono.Cecil.ImmediateModuleReader.ReadFields(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
   at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
   at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
   at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module, Boolean resolve_attributes)
   at Mono.Cecil.ModuleDefinition.Read[TItem](TItem item, Action`2 read)
   at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
   at Unity.Jobs.CodeGen.JobsILPostProcessor.AssemblyDefinitionFor(ICompiledAssembly compiledAssembly)
   at Unity.Jobs.CodeGen.JobsILPostProcessor.Process(ICompiledAssembly compiledAssembly)
   at Unity.ILPP.Runner.PostProcessingPipeline.PostProcessAssemblyAsync(PostProcessAssemblyRequest request, Action`2 progressSink)
   at Unity.ILPP.Runner.PostProcessingService.PostProcessAssembly(PostProcessAssemblyRequest request, IServerStreamWriter`1 responseStream, ServerCallContext context)
Unhandled Exception: System.InvalidOperationException: Post processing failed
   at Unity.ILPP.Trigger.TriggerApp.<ProcessArgumentsAsync>d__1.MoveNext() + 0xf74
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at Unity.ILPP.Trigger.TriggerApp.<ProcessArgumentsAsync>d__1.MoveNext() + 0x1149
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
   at Unity.ILPP.Trigger.TriggerApp.<RunAsync>d__0.MoveNext() + 0xc7
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
   at Program.<<Main>$>d__0.MoveNext() + 0x1a3
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb6
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
   at Program.<Main>(String[]) + 0x20
   at Unity.ILPP.Trigger!<BaseAddress>+0x47849b

Things I’ve done so far:

  • Made sure IL2CPP module is installed on this machine
  • Made sure both machines have the same .NET versions installed
  • Restarted the machine

Any tips in tracking this down?

Update: this error showed up in both machines after all, but it didn’t show up on the machine I thought was working until I tried to build the Addressables content to make a new build. (I’m guessing I must have had my Addressables Play Mode Script set to ‘Use Existing Build’ on the other machine where this error prevented playback, but I’ll have to confirm later).

So now I’m a bit stuck on this error before I can finish up the move to 2022.3 (I’m coming from 2020.3 and other than getting the Addressables content built, everything else has been migrated without issue), but it seems the stack trace isn’t doing me any favors.

I’ve tracked the source of this error down to a pretty weird place after slowly commenting out all my systems one-by-one: it was a call to UnityEngine.Debug.LogWarning inside a SystemBase’s OnUpdate method. The call was nested within two lambdas, but did NOT use any Job related stuff (at least it wasn’t attempting to, no calls to Entities in there).