Search Unity

.Net compatibility problem using MathNet lib in Unty [Help]

Discussion in 'Editor & General Support' started by Alkaelis, May 3, 2014.

  1. Alkaelis

    Alkaelis

    Joined:
    Apr 8, 2014
    Posts:
    1
    Hi everyone, I'm having an issue about .Net Framework compatibility while using the MathNet library.
    I managed to load and use this lib in mono develop without problems except somes warnings wich seams to turn into errors in unity.

    Warnings in MonoDevelop
    Code (csharp):
    1. A reference to the type 'System.Tuple`3' report to be define in 'c:\Windows\Microsoft.Net\Framework\v2.0.50727\mscorlib.dll' but it is not found
    2. A reference to the type 'System.Tuple`2' report to be define in 'c:\Windows\Microsoft.Net\Framework\v2.0.50727\mscorlib.dll' but it is not found
    3. A reference to the type 'System.Tuple`4' report to be define in 'c:\Windows\Microsoft.Net\Framework\v2.0.50727\mscorlib.dll' but it is not found
    Errors in Unity
    Code (csharp):
    1. Internal compiler error. See the console log for more information. output was:
    2. Unhandled Exception: System.TypeLoadException: Could not load type 'System.Reflection.AssemblyVersionAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
    3.  
    4.   at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool)
    5.  
    6.   at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in <filename unknown>:0
    7.  
    8.   at System.Reflection.Assembly.GetType (System.String name) [0x00000] in <filename unknown>:0
    9.  
    10.   at Mono.CSharp.RootNamespace.GetTypeInAssembly (System.Reflection.Assembly assembly, System.String name) [0x00000] in <filename unknown>:0
    11.  
    12.   at Mono.CSharp.RootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in <filename unknown>:0
    13.  
    14.   at Mono.CSharp.GlobalRootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in <filename unknown>:0
    15.  
    16.   at Mono.CSharp.Namespace.LookupType (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in <filename unknown>:0
    17.  
    18.   at Mono.CSharp.Namespace.Lookup (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in <filename unknown>:0
    19.  
    20.   at Mono.CSharp.TypeManager.CoreLookupType (Mono.CSharp.CompilerContext ctx, System.String ns_name, System.String name, Kind type_kind, Boolean required) [0x00000] in <filename unknown>:0
    21.  
    22.   at Mono.CSharp.PredefinedAttribute.Resolve (Boolean canFail) [0x00000] in <filename unknown>:0
    23.  
    24.   at Mono.CSharp.PredefinedAttributes.Initialize () [0x00000] in <filename unknown>:0
    25.  
    26.   at Mono.CSharp.TypeManager.InitOptionalCoreTypes (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
    27.  
    28.   at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
    29.  
    30.   at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
    I tried and searched for days but i can't figure how to solve this matter. I'm new in Unity developement so I may have missed something obvious :-(

    I'm using Unity 4.3.4f1 and MathNet 2.6.1.30

    Does anyone can help me ?