I have a c# v3.5 framework site that I am doing some maintenance on. I wish to use Automatic Properties but whenever I try to add one, the compiler fails [as below]. I have added the System.Core.dll (and it is in the web.config ok) but still no joy.
Anyway seen this behavior before and have a resolution?
Thanks,
dan
Error 6
‘XXX.Archive.TypeOfArchive.get’ must declare a body because it is not marked abstract or extern
============
It looks like your application is still being compiled with 2.0 version of the compiler. If it is a web application, you may need to configure the compiler in web.config. See for example this question.
Also, you shouldn’t need
System.Core.dllto get automatic properties working. Unlike LINQ, automatic properties are purely a feature of the compiler and don’t depend on any types from .NET 3.5 libraries.