Search Unity

.Net Framework libraries does not work with same framework and different unity Version

Discussion in 'General Discussion' started by PrateekP, Feb 8, 2019.

  1. PrateekP

    PrateekP

    Joined:
    Feb 14, 2018
    Posts:
    7
    It's great new that Unity has upgraded their .Net framework to 4.X and moving to C# 7. But can anybody let us know which exact version of .Net framework unity is using so that it will be easy for us to integrate external libraries developed in .Net framework.

    Currently I m facing issue with Unity version 2018.3.

    I m using a custom library which was build in .Net 4.6 framework and it was working with following :
    Unity Version : 2018.2.20
    Scripting Runtime Version : .Net 4.x Equivalent
    Api Compatibility Level : .Net 2.0 Subset / .Net 2

    but when I upgraded my project to Unity 2018.3.0 I m getting issues Library.

    “Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:

    Reference has errors 'mycustomLib'. “

    Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor.dll' will not be loaded due to errors:

    Reference has errors 'Assembly-CSharp'.

    Assembly 'Assets/Lib/mycostumlib.dll' will not be loaded due to errors:

    Unable to resolve reference 'mycustomlibInner'. Is the assembly missing or incompatible with the current platform?



    Using which .Net framework should I build my library in order to make it run perfectly in Unity 2018.3.4.
    What is the effect on external libraries on c# version upgrades.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Is mycustomlibInner.dll in your project? It says it cannot find it.
     
  3. PrateekP

    PrateekP

    Joined:
    Feb 14, 2018
    Posts:
    7
    I used the customlib inner for making build only for editor it’s not required. Previously I got same issue because I made lib using .net virsion not unity compatible and it was giving the same issue but after making lib with .net unity compatible issue got fixed for the Editor.

    Now the problem is lib which is working in Unity 2018.2 with .net version 4.x is not working in unity 2018.3.
     
  4. karan_pl

    karan_pl

    Joined:
    Feb 22, 2019
    Posts:
    1
    @PrateekP have you got the solution for this?
     
  5. PrateekP

    PrateekP

    Joined:
    Feb 14, 2018
    Posts:
    7
    This issue is fixed but now the issue is coming when i m making the build. Things are working in the editor but in Build its not working.

    I have check this in Unity 2019.1.6 released version
     
    Last edited: Jun 21, 2019