cant complie code

Topics: ASP.NET 2.0, Business Logic Layer
May 26, 2009 at 9:10 AM


I downloaded BlogEngine.NET 1.5 (source) and I am trying to Compile it. I am trying to compile on VS 2005 in .NET 2.0.

I am getting error

Error    1    'BlogEngine.Core.BlogSettings.Description.get' must declare a body because it is not marked abstract or extern    X:\BlogEngine.NET 1.5\BlogEngine.Core\BlogSettings.cs    93    31    BlogEngine.Core

there are 125 error of the same kind saying that get must declare a body because it is not marked abstract or extern.


Am I missing something?





May 26, 2009 at 9:15 AM

I think the problem is that you're using VS 2005.  The source for BE 1.5 was written using VS 2008.

The problem specifically is that the BE Core code is using new compiler level features introduced in VS 2008 -- such as Automatic Properties and Lambdas.

The compiled code runs in a .NET 2.0 environment, but to build the code (particularly the Core code), it needs to be done in VS 2008.

May 26, 2009 at 10:57 AM

If you aren't ready to upgrade just yet, download Visual Web Developer 2008 Express. It's free from MS and will build BE.

Jul 15, 2009 at 10:54 AM

I've downloaded BlogEngine 1.5 (source) and am able to view and build the code in BlogEngine.Core using Visual c# 2008 Express Edition.

However, this IDE seems to have a problem loading BlogEngine.Net - displays this dialog:  "c:\<path>BlogEngine.NET cannot be opened because its project type () is not supported by this version of the application To open it, please user a version that supports this type of project".

Do I need to be using MS Visual Web Developer 2008 Express instead - or might there be another cause of this error? Maybe I've missed some basic documentation on this?



Jul 15, 2009 at 11:15 AM

Dermot:  Probably Visual C# 2008 Express Edition can only work with non-web projects, like what the BE Core is.  However, the web project in the BlogEngine.NET folder doesn't need to be compiled -- so technically, you don't need Visual Web Developer 2008 Express Edition.

Visual Web Developer 2008 Express Edition will be able to open the web site project (the BlogEngine.NET folder), and it can also probably compile the BE Core project.  So, in short, yes, you'll need Visual Web Developer 2008 Express edition if you want to open the BlogEngine.NET website (File -> Open -> Website) and use Visual Studio for making edits to it (edits can also be made in a regular text editor too).

But as I mentioned, now that that you've built the core, the only reason you would need Visual Web Developer 2008 Express Edition would be if you want to make some modifications to the website project in the BlogEngine.NET folder.  Visual Web Developer Express Edition would give you intellisense and other features to make editing the code simpler.  Even then, a compile isn't necessary.  Just modifying the files alone is enough because the website project is an uncompiled project.  You just copy the files to the website, and it runs.

Jul 15, 2009 at 11:16 AM

Sorry folks, please ignore my last post - it all loads up for me now with MS Web Developer 2008 Express.

Jul 15, 2009 at 11:20 AM

BenAmada, very useful reply - thanks.