- Home /
Can I use .NET 4.5 assembly as external library?
I want to use set of features, implemented in .NET Framework v4.5. Cause Unity3D works on Mono runtime(equivalent to .NET 3.5), i think to use .NET4.5 assemblies as external plugin.
Is it possible? If it possible, which runtime will be used for this libraries - Mono or assembly's target runtime (.NET 4.5 in my case)?
Answer by billykater · Dec 21, 2013 at 02:38 PM
no it is not possible to use a 4.5 assembly (even as external plugin). The runtime is still 3.5 even if you compile an external dll with 4.5, the basic vm/runtime features introduced in 4.x aren't available in unity so the dll won't load.
.NET 4.5 installed on my desktop. Why external assembly can't use this runtime?
Unity doesn't use .NET but mono (the pretty old 2.6.5, even on windows). Even if you compile your dll with .NET 4.5 it will still try to use mono to execute the dll which doesn't have any of the 4.x standard library or runtime features which are needed to run a 4.5 dll.