BlogEngine.NET 2.0 Widget Compatibility

Topics: ASP.NET 2.0, Controls
Feb 24, 2011 at 11:50 PM

Hi,

There are a number of compatibility issues with the widgets that are available for download for BlogEngine.NET 2.0.

I stumbled across this as I have recently upgraded from BlogEngine v1.6 to v2.0 and I noticed the AdSense and Feedjit widgets were both reporting errors on the default.aspx home page.

The error was:

Widget Feedjit not found.

<directory>\widgets\Feedjit\widget.ascx.cs(8): error CS0246: The type or namespace name 'WidgetBase' could not be found (are you missing a using directive or an assembly reference?)

Widget AdSense not found.

<directory>\widgets\AdSense\widget.ascx.cs(15): error CS0246: The type or namespace name 'WidgetBase' could not be found (are you missing a using directive or an assembly reference?)

 

Resolution:

I managed to fix this by adding the following line of code into each widgets widget.ascx.cs file:

using App_Code.Controls;

 

See example for Feedjit below.

 

Before:

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Collections.Specialized;

....

 

After:

using System;

using System.Collections.Generic;

using System.Web;using System.Web.UI;

using System.Web.UI.WebControls;

using System.Collections.Specialized;

using App_Code.Controls;

....

 

Hope this helps!

 

Cheers

S.