- Home /
MonoDevelop DLL Build : Problem with default parameters
Hi there,
So here's the problem. I wanted to build a DLL using MonoDevelop but the compiler refused to build it because of default parameters for some functions.
I then tried to build it using latest MonoDevelop version (Xamarin Studio) and it worked just fine. I then imported it in a project : no compiler error, I thought I was good to go. But when running some of my DLL code, I get MethodNotFound exceptions from inside my DLL, notifying me that equality operator cannot be found for System.Type. It seems that my DLL is not happy to see that default Unity Mono Assembly's version is older than the version it expects.
So the question is quite simple : is there a way to build a compatible DLL with default parameter ? Or do I have to refactor the whole thing ?
Thanks in advance for your answer.
Answer by Bunny83 · Aug 07, 2013 at 02:07 AM
Default parameters are a C# 4.0 feature. So yew, you have to reaplace the default parameters with seperate functions.
Erf, I expected something like that. But what version of $$anonymous$$ono does Unity uses ? Because Unity has no trouble working with default parameters while $$anonymous$$onoDevelop does not compile. Does that mean that $$anonymous$$onoDevelop and Unity don't use the same framework version behind the scene ?
Anyway, I'll refactor that. I did not create too many functions with default parameters so that shouldn't be much of a trouble, but still :x