Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity: Multiple precompiled assemblies with the same name Mono.Cecil.dll included or the current platform. #2630

Closed
Faketa opened this issue Sep 19, 2021 · 3 comments · Fixed by #2640
Assignees

Comments

@Faketa
Copy link

Faketa commented Sep 19, 2021

What happened?

After import the latest release I've get the below error:
Multiple precompiled assemblies with the same name Mono.Cecil.dll included or the current platform.

My Unity packages uses "com.unity.nuget.mono-cecil@1.10.1-preview.1".

Repro steps

Import the latest release of the Realm SDK into the Unity

Version

5

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

What type of application is this?

Unity

Client OS and version

Windows 10 Pro

Code snippets

No response

Stacktrace of the exception/crash you're getting

No response

Relevant log output

No response

@nirinchev
Copy link
Member

Realm uses Mono.Cecil in the editor plugin to weave the C# models on compilation. Are you including Mono.Cecil with your game or are you also using it for compile-time modifications? One option would be to remove your dependency on Mono.Cecil and use the one bundled with Realm. Alternatively, we could look into embedding it into the editor plugin to avoid conflicts like that.

@Faketa
Copy link
Author

Faketa commented Sep 21, 2021

Hi, thanks for your answer. Unfortunately, MLAPI package depends on Mono.Cecil DLL internally. I can't change that. Is there any solution for such a case?

@nirinchev
Copy link
Member

Yeah, that's not ideal. I'll look into IL-merging Mono.Cecil with the editor assembly to avoid that conflict and report back when we have a pre-release version that you can test.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants