Hi All, I have been trying to host an application developed in ASP.NET 3.5 with c# 3.0. I have used the advanced features in C# 3 like "extension methods" and "collection initializers". The project compiles successfully in monodevelop but once i deploy it using mod_mono and xsp2, I get an error saying "CS1644: Feature `collection initializers' cannot be used because it is not part of the C# 2.0 language specification" I have checked the compile command and it has the langversion set to ISO-2, after some research from the internet I found out that I need set the langversion to default or 3 or linq to enable c# 3.0 features, which I did in mono develop, but unable to do the same for XSP2. I have tried changing the web.config file adding section with compileoption but still I get the same error. I am using openSuse 11.2, mono 2.6 and xsp2. Please help me fix the issue as I need to modify around 100 source files to make it work with the C# 2.0 :(. Thanks and Regards Sandeep Chada
Since Mono's ASP.NET 3.5 configuration does not differ from MS.NET, you may want to have a look at MS' docs or at this article: http://www.4guysfromrolla.com/articles/121207... (the second part (with the yellow highlightings)) RobertOn 18.05.2010 06:17, Arun Sandeep wrote: > > Hi All, > > I have been trying to host an application developed in ASP.NET 3.5 with c# > 3.0. I have used the advanced features in C# 3 like "extension methods" and > "collection initializers". The project compiles successfully in monodevelop > but once i deploy it using mod_mono and xsp2, I get an error saying "CS1644: > Feature `collection initializers' cannot be used because it is not part of > the C# 2.0 language specification" > > I have checked the compile command and it has the langversion set to ISO-2, > after some research from the internet I found out that I need set the > langversion to default or 3 or linq to enable c# 3.0 features, which I did > in mono develop, but unable to do the same for XSP2. I have tried changing > the web.config file adding section with compileoption but still I get the > same error.