- Home /
Unity 4.3 Mono 4.0.1 and the .NET 3.5 to 4.0 Library issue
Hello, I was wondering, while Unity 4.3 uses Monodevelop 4.0.1 (and the subsequent .NET 4 equivalent) why is Unity stuck with the .Net 3.0/3.5 equivalent? I ask because I'm trying to use a library that targets 4.0 but it doesn't work because it says the project is built for 3.5.
If that question isn't clear, is there a way of using 4.0 and then layering with 3.5 calls?
An update: So I have used .NET 4 as the target platform and Unity still is having issues with it.
i can only see .NET 2.0 in API CO$$anonymous$$PATIBILITY Setting of graphics or player settingts in preferences or whatever.
Answer by dkely · Apr 23, 2014 at 06:07 PM
You cannot call a library from .net 4 unfortunately. I recently came up against this issue when i wanted to use a large program in a port to Unity. The solution was to run the original program as a service and then have my Unity program call that service to get its results in a serialized form.
Answer by Kirielson · Apr 23, 2014 at 06:25 PM
Okay, I've been working on it but there have been errors trying to make the project 4.0. Anyone have any suggestions on this scenario?
I am not quite sure what you mean. You are not trying to make your Unity project 4.0 (becasue its not possible) and your other library is already 4.0 which is the problem, right? You are looking to create a middle man program that Unity can access and which can access your 4.0 or higher .net libraries.
If I can I will, but I'm assu$$anonymous$$g that's not possible.
Just to clarify one more time because i feel we are still not on the same page:
1.Unity will not take a library directly (if it targets .net 4.0 or higher). 2.You can access the library through another program you create and then parse the data from Unity to the new program where it will put it through the library and then parse the return value back to unity again.
Here is my question on a similar vein: http://answers.unity3d.com/questions/689003/connect-to-a-c-application-on-the-server.html#comment-693106
Your answer
![](https://koobas.hobune.stream/wayback/20220613143210im_/https://answers.unity.com/themes/thub/images/avi.jpg)