Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Git, DLLS and Packages

Discussion in 'Assets and Asset Store' started by hsr38, Mar 5, 2023.

  1. hsr38


    Aug 15, 2012

    I have been struggling to understand the correct approach to keep DLL files that came along with asset store installed packages working accordingly whenever I move between git versions within a project or when open a project for the first time in another machine. To illustrate my issues, I have recently moved from the latest git commit point to an earlier version. When I did it, the project, which includes many packages such as Oculus and SteamVR XR, was not able to be compiled because unity was accusing DLLs with exact same name exists in multiple different folders. The problem is that this how it is meant to be, those DLLs were in folders named after their platforms such as Android, Windows, Mac etc. To solve the issue, at least for a small project that I had, I had to remove one the said duplicate DLL, so that unity could finish compiling and loading the project, before moving it back to the same folder it was before. After that the problem vanished. This is a clear bug fault of unity engine wrongly classifying DLLs in different folder with same as a problem.

    Recently, I was in big VR project, which once I moved from one PC to another, it yielded so many DLLs duplicates warnings that I decided to gave up fixing and instead hard copying the project to the new machine. My question is whether there is a more efficient way to make unity understand there is nothing wrong with those DLLs coming from a git repo.


    My unity version is 2021.3.17
  2. CodeSmile


    Apr 10, 2014
    Did you have that project open in the Unity editor when you rolled the repository back to an earlier version?

    If the Unity project is closed and you make changes to the project's folder structure via git (or any other VCS) and then re-open that project, there should not be any problems regarding duplicate DLLs.
    Unless, of course, there are actual duplicates of these DLLs in the project either because that's how it was committed or something else went wrong during the rollback, such as some other process having a lock on the DLLs and then possibly some tool (or Explorer) trying to be helpful and just saving it as "ThatDll (1).dll" instead.
    Or perhaps a parent folder containing the DLLs was renamed at some point, and that original named folder was restored but the current named folder wasn't removed for some reason. Could it have been something like that?

    It would be helpful if you explained exactly what the directory structure of the project regarding these DLLs was before and after the rollback. Where did those duplicate DLLs appear, and why?

    I bet my horse that this isn't a Unity problem!

    Disclaimer: I do not own a horse. :D