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.
  2. Dismiss Notice

Question Can't update to 0.9.0, CsvHelper.dll multiple precompiled assemblies

Discussion in 'Localization Tools' started by unknowndevice, Oct 29, 2020.

  1. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    I just tried updating to 0.9.0 but another package I use (YarnSpinner) uses CsvHelper.dll so there's a conflict.

    Is there anyway you could scope the .dll or add it as a separate package and reference it like com.unity.nuget.newtonsoft-json. Then other packages could use it as well. This seems like a really common issue for packages.

    Right now my only choice is to pull one of the packages into the project and remove the dll.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Yeah this is becoming an issue more often. I'll look into making it a package.
     
    unknowndevice likes this.
  3. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    Thanks so much @karl_jones! I realise this problem is part of a much wider problem with how the package manager works, and isn't necessarily your problem to solve. So I really appreciate you trying to do something!
     
    karl_jones likes this.
  4. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    450
    Same here. Really annoying :)
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    We have fixed this in the next version. We merged all the dependencies into a single DLL so you won't get conflicts with our dependencies anymore.
     
    MUGIK likes this.
  6. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    450
    That's great! Can I have access to the new version through GitHub or smth? I use CsvHelper in my project so I need this reference in my own scripts. That's why unknowndevice's solution is not working for me :(
    Or I missing something...

    UPD
    I've searched google, looks like the source code of this package is not publicly available as, for example, New Input System.
     
    Last edited: Nov 19, 2020
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Sorry, our GitHub is not public and the current version is not ready for release. The next release is likely to be early January now. unknowndevice's solution is to just remove the CsvHelper.dll project from one of the packages so there's only 1.
    You could even try removing it from the Localization package, it should then use your version of the Dll.
     
    MUGIK likes this.
  8. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    450
    Yeah, but this requires importing Localization package right into the Assets folder.

    Unfortunately, package manager keeps reimporting packages on engine restart when I try to remove CsvHelper.dll from PackageCache/... folder (package-lock doesn't help)

    Thanks for help!
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    No, you don't need to import it into your Assets folder. Copy it into the Packages folder. This changes the package to be embedded which means you can safely make changes to it.
    You can then delete the embedded package in the future when 0.9.0 is released.
     
    MUGIK likes this.
  10. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    48
    Hi, I'm having a similar problem but with Newtonsoft Json. Since it's a similar problem I'm going to post it here instead of starting a new thread:

    It looks to me that the 2.0.0 version of the package came with the dlls improperly setup as I got this error during a Windows build:


    PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform. Assembly paths:
    D:/dev/Verum/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/AOT/Newtonsoft.Json.dll
    D:/dev/Verum/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll

    I checked the import settings for these dlls and they seem to be both active for desktop platforms:

    upload_2020-11-25_20-38-25.png

    I managed to fix it by moving Newtonsoft Json to my packages folder and editing the dll import settings.
     
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    We have removed the dependency on Newtonsoft in the next version.
     
    Garrafote likes this.