WebGL build failure: Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Profiler
I've suddenly encountered build failures with my WebGL game on Unity 5.5.0f3. The error used to not occur with Unity 5.4.3f1, but for some reason, even when I rolled back my Unity version, I still have this error:
stdout:
SweepReport:
System.RuntimeType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
Mono.Cecil.MethodDefinition => System.Void .ctor()System.Void .ctor(System.String)System.String get_Comment()System.Void .ctor()System.Boolean get_CanTransformMultipleBlocks()
Mono.Cecil.FieldDefinition => System.String commentSystem.Func`3<System.Int32,System.Int32,System.Int32> <>f__am$cache0System.Func`3<System.Int64,System.Int64,System.Int64> <>f__am$cache1System.Func`3<System.Double,System.Double,System.Double> <>f__am$cache2System.Func`3<System.Single,System.Single,System.Single> <>f__am$cache3
Fatal error in Mono CIL Linker
Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Profiler
at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process()
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.RunDriver(Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer)
stderr:
I suppose the important part here is Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Profiler.
Disabling Strip Engine Code
also doesn't help. Any ideas on how this can be fixed? Thanks!
Answer by brain56 · Jan 04, 2017 at 08:49 PM
The error was caused by a DLL made obsolete by Unity 5.5.0f3. Deleting the Library folder to force a reimport of everything fixed it.
Do you $$anonymous$$d sharing which DLL it was for you? Thanks!
@rayjohannessen it was a DLL file containing C# code we use internally.
Cool, thanks. I needed to update a plugin that I was using.
Your answer
Follow this Question
Related Questions
Build WEBGL Error in Unity 2019.3.3f1 1 Answer
white screen after build the game for WEBGL,white screen after building the game to WEBGL 0 Answers
WebGL build exception 0 Answers
WebGL build creates an empty folder. 0 Answers
Webgl build problems 1 Answer