🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Unity 5: DLL naming conflict with same names even if in different directories

Started by
4 comments, last by DriverSim 8 years, 12 months ago

Im in the process of migrating my Unity 4 Project to Unity 5... and while I expected a lot of pain doing that (seeing how much of the API changed), I wasn't prepared for this particular problem.

Now I know that I might need to contact Unity about this problem, but a) I don't really trust Unity user support too much, they are fine guys and are usually very helpful, but seem to be usually COMPLETELY drowned in work (most of the time, I get no response), and b) same can be said about the Unity forums. I DID start a thread in the Unity forums, no response for a week does not make me confident that I will get any help in a timely manner there.

And as there are a lot of fellow unity users on this forum, I will just try my luck here. Maybe someone ran into the same problem before and was able to fix it?

Here is what I wrote on the unity forums:

Hi

I just imported my Unity 4.3 Project into my new Unity 5 installation. I expected many errors to fix, but some of them really make me scratch my head, no less as they are affecting 3rd party dev assets.

This is especially weird: I have had the Logitech SDK in my project for a long time now to use DirectInput for the XBOX Controllers (So I could get rumble to work). Now, this has always worked just fine in Unity 4, with no error whatssoever. I haven't changed anything before or after the import to Unity 5, still there are now new errors popping up in the console:

Multiple plugins with the same name 'logitechlcd' (found at 'Assets/Logitech SDK/Lib/LCD Lib/x64/LogitechLcd.dll' and 'Assets/Logitech SDK/Lib/LCD Lib/x86/LogitechLcd.dll'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.

Could anyone help me what is the problem here? I read that having multiple dlls share the same name in the same folder could be a problem, but these seem to be properly put into their own folder to distinguish between x86 and x64 versions, even if the GUID wouldn't be correctly set.

Anyone got the Logitech SDK already to work with Unity 5? What did you do? Do I need to rip it out of the project and re-import the SDK?


Thanks in advance for any help!


Gian-Reto



EDIT: just to be clear, this problem affects ALL plugin dlls, not just the logitech ones! I get such errors all over the place.
Seems Unity 5 cannot handle DLLs with the same name, even if they are in different folders. I don't think this is expected behaviour?

Now, to describe the problem in a more detailled and precise form:

Since starting to use Unity 5, it seems DLLs contained in different directories but sharing the same name started conflicting with each other and throwing errors as seen above in my Unity forum post.

This affects ALL DLLs, not just the LogitechSDK ones! This same setup worked fine in Unity 4, and according to the documentation, should also work fine.

Now, it could be that Unity somehow changed the naming rules for DLLs (which I would be a little bit puzzled about, as it would mean lots of third party asset providers had to redo their DLL naming for no good reason), or that this is just a teething problem of Unity 5. I couldn't find a thread on that particular problem in the Unity forum and on google, but I cannot be the only one facing this problem.

I got this problem when migrating my old Unity 4 project to Unity 5, and I get the same problem when creating a new Unity 5 project, and import the LigtechSDK into it. I get the same errors for any other Unity package that use multiple DLLs with the same name in different dirs.

Anyone got the same problem and found a way to fix it? Anyone got any idea what I could try before I contact the thirdparty asset providers and tell them to fix their naming?

Thanks for any help

Gian-Reto

Advertisement

Seems like you have a conflict between a 64bit and a 32bit installation.

Get rid of one of them.

Apparently, Unity (or whatever) loads both sets of DLLs into the current runtime path.

<edit>

You probably didn't receive an answer because it is about a third-party "plugin", LogiTech stuff.

Too many projects; too much time

Well, to me it seemed like a more general problem with DLLs... as far as I understood it, the LogitechSDK puts both the 32bit and 64bit dll in their Unity package, as they are needed later on in the game build (that might run either on 32bit or 64bit machines).

But now that you mention it, that is not really what a "plugin" should be about, no? I guess the DLLs are only used by the engine editor, and are never really shipped in the game builds... guess I will do just what you suggest, delete the 32bit stuff, build the game, and try to start it on a 32bit system (well, if I can find one..... I only bought 64bit systems since a long time ago)

True about the third party thing... I might have chosen a bad thread title, which made it look like a third party asset problem instead of a more general DLL loading problem (or a general problem with me completly misunderstanding what the plugin DLLs are used for :) )

Thanks a lot, I will give it a try.

If they were distribution DLLs they would have been packaged in msi's (or other installation binaries) - not many things gets installed by xcopy these days. :)

Still, strange issue.

Too many projects; too much time

gave it a try this morning, just removed the x86 directories, restarted the editor, and the errors are gone.

I was not able to REALLY test if the X Input method for the XBOX pads is still working or not, as I am still in the process of reconstructing my old 4.3 project in Unity 5 (Converting the project ended in a startup crash at some point, I cannot even load the project anymore without a crash)... I am even further from actually building and testing it on a 32bit installation.

Most probably it will be working fine.... well, I will update this thread if this is not be the case.

We experienced this same thing after migrating from U4 to U5. Here's what we found..

http://forum.unity3d.com/threads/unity-editor-crashes-with-native-plugin-on-stop.315884/

If you find a workaround let us know.

This topic is closed to new replies.

Advertisement