I’ve been coding away on my first C# plugin, and run into trouble.
I get an error message like this when calling certain methods:
Could not load file or assembly ‘System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies.
I use Linq a lot in my plugin, and now I have ran my head straight into the wall on this. Linq is a .NET 3.5 feature, and now I worry that Unity doesnt support this yet.
Sorry if this is a noob question, but I’m quite new to C# and Unity.
bad news: Unity 2.0 supports only .NET 2.0. So Linq is pretty much out of sight for use with Unity - unless you use it on a Web server that Unity accesses through HTTP
Generally speaking, it’s a good idea to avoid stuff that’s not in mscorlib.dll in Unity - at least if you plan on creating a Web player, because that will significantly increase the download size, as the relevant DLLs must be included with the download.
Of course, it really depends on what you’re doing… But .NET 3.5 probably will not work at all… I’m not sure if Mono does support the 3.5 features, yet (I would suspect not)…
Your LINQ life is totally in the hands of the UT guys
We’ve just implemented a whole bunch of platform WCF services using LINQ to SQL - its so nice, I can’t ever imagine going back.
We want to update to new Mono version very carefully. So yeah, we’ll do it at some point, but don’t know exactly when.
Before releasing Unity 2.0 we spent two months fighting bugs in a pre-release version of Mono, and we don’t want to go there again. Stable versions only.
(why we tried to use a pre-release version? because the stable one at that point had some annoying memory leaks)
The current Stable release of Mono is 1.9
“Mono 1.9 is our last release before Mono turns 2.0, it is a stable release and an update to Mono 1.2.6 in the Mono 1.2 series, it is a bug fix release for all the supported components, but also includes updates on the 2.0 and 3.5 stacks.”
This version uses a “new” c# compiler that targets the 3.5 .Net runtime?