[5.2.1p3] Mono.Cecil.AssemblyResolutionException UnityEngine.UI.dll

Hi,

I am getting this error on Unity 5.2.1p3. Basically, Unity is failing to resolve UnityEngine.UI.

Any idea what could be causing this?

Thanks.

Getting this as well on two DLLs built with Visual Studio after updating to Unity 5.2.1f1.

Doesn’t seem to be causing a problem. I can still run and debug just fine (I had an issue where the debugger froze until reattached, but I’m not sure if it’s related yet).

Same here causing my cloud builds to fail

@AlienMe Can you post the full editor log?

Thanks

Adriano

@Vagaus This is the editor log. We use VS 2013 + UnityVS.

The error occurs when our game DLLs are built in VS, And Unity regains focus, and ‘reimports’ them.

Thanks for the log.

This issue has already been fixed and should land in the next beta

Adriano

Great! Thanks.

This issue still occurs in version 5.2.2f1 Personal.
Is that expected or should have it been fixed in that version?
Are there any workaround solutions or should we wait until 5.3 or 5.2.3?

Thank you!

The fix is being back ported to 5.2. Don’t know if it will make 5.2.3 though.

Adriano

I’m still getting this error in Unity 5.2.2f1 so I cannot build plugin DLLs from my asset.

Hi. This should be fixed in 5.2.2p4

Is there a workaround? (or would going back to 5.2.0f fix it?)
Because I’m getting that error in every project and I’m not able to test anything in Unity since I can’t go into Playmode.

It also happens with 5.3. Like jrdmellow said, it doesn’t seem to cause any actual problems for me, but I’d really prefer not to have errors generated.

–Eric

@DomDom

Hi
Yes, there’re some possible workarounds.

You could try to copy the assembly that we are failing to resolve to the same place as UnityEngine.dll but I am not sure whether this would not cause other issues.

There’s another option that consist in replacing AssemblyUpdater.exe with a fake executable that just returns 1, but you need to understand that by doing this you are effectively disabling the updating mechanism for assemblies and you may get other errors @ build/runtime.

I only recommend taking this approach as a last resort (which looks to be your case since it is blocking you); also, if you go through this route, consider updating to a newer version ASAP

Adriano

@Eric5h5
I think my changes only fixes this issue on Windows (QA reported today they can still reproduce this issue on OSX).

I am investigating it now

Adriano

@Vagaus I can confirm that sadly this issue still happens even on Windows, using Unity 5.2.3f1

P.S. the problem seems to be related only to DLLs that reference UnityEngine.UI

@lzitmee

The issue is related to any assembly in UnityExtensions being referenced in the project.

Unfortunately the fix did not make its way into 5.2.3f1 but it is included in 5.2.3p1

BTW: I’ve found the the problem on OSX. It is fixed and should land in the next patches.

Adriano

Great! Thanks Adriano

Hello. Same problem with 5.3.0f4

Hi. The patch is not included in 5.3.0f4. It will be include in a patch release in the near future (can’t precise which patch release though, sorry)

Adriano