The name 'ExtensionManager' does not exist in the current context Global.asax

Apr 7, 2011 at 5:28 PM

I just pulled this project from the SourceSafe to fix a Null Reference exception being thrown, I've never seen this project so I have no idea how it's set up. When I try to run it on my local machine i get the error that I mentioned in the title: "The name 'ExtensionManager' does not exist in the current context Global.asax". I've checked my references and I have the BlogEngine.Core namespace. 

 

<%@ Import Namespace="BlogEngine.Core" %>
<%@ Import Namespace="BlogEngine.Core.Web.Controls" %>
<%@ Import Namespace="BlogEngine.Core.Web" %>
<%@ Import Namespace="BlogEngine.Core.DataStore" %>


void Application_Start(object sender, EventArgs e)
 {
 ArrayList codeAssemblies = Utils.CodeAssemblies();
 List<SortedExtension> sortedExtensions = new List<SortedExtension>();

 foreach (Assembly a in codeAssemblies)
 {
 Type[] types = a.GetTypes();
 foreach (Type type in types)
 {
 object[] attributes = type.GetCustomAttributes(typeof(ExtensionAttribute), false);
 foreach (object attribute in attributes)
 {
 if (attribute.GetType().Name == "ExtensionAttribute")
 {
 ExtensionAttribute ext = (ExtensionAttribute)attribute;
 sortedExtensions.Add(new SortedExtension(ext.Priority, type.Name, type.FullName));
 }
 }
 }

 sortedExtensions.Sort(delegate(SortedExtension e1, SortedExtension e2)
 { return e1.Priority.CompareTo(e2.Priority); });
 foreach (SortedExtension x in sortedExtensions)
 {
 if (ExtensionManager.ExtensionEnabled(x.Name))//Error Happens here
 {
 a.CreateInstance(x.Type);
 }
 }
 }
 }
Apr 7, 2011 at 6:03 PM

BE 2.0.0.49 : Web.config, add after </controls>

<namespaces>
    <add namespace="BlogEngine.Core"/>
</namespaces>

 

 

Apr 7, 2011 at 6:14 PM
Edited Apr 7, 2011 at 6:56 PM

That is already there

 

 <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add namespace="Controls" tagPrefix="blog"/>
      </controls>
      <namespaces>
        <clear />
        <add namespace="BurchfieldAdmin" />
        <add namespace="BurchfieldAdmin.UI" />
        <add namespace="BurchfieldAdmin.UI.Controls" />
        <add namespace="BurchfieldAdmin.Data" />
        <add namespace="BurchfieldAdmin.Business" />
        <add namespace="System" />
        <add namespace="System.Collections" />
        <add namespace="System.Collections.Specialized" />
        <add namespace="System.Configuration" />
        <add namespace="System.Text" />
        <add namespace="System.Text.RegularExpressions" />
        <add namespace="System.Web" />
        <add namespace="System.Web.Caching" />
        <add namespace="System.Web.SessionState" />
        <add namespace="System.Web.Security" />
        <add namespace="System.Web.Profile" />
        <add namespace="System.Web.UI" />
        <add namespace="System.Web.UI.WebControls" />
        <add namespace="System.Web.UI.WebControls.WebParts" />
        <add namespace="System.Web.UI.HtmlControls" />
        <add namespace="BaseClasses" />
        <add namespace="BaseClasses.Web.UI.WebControls" />
        <add namespace="BlogEngine.Core"/>

      </namespaces>

 

Apr 7, 2011 at 7:01 PM
Edited Apr 7, 2011 at 7:02 PM

2.0.0.49 has admin/extensions instead of admin/Extension Manager dir.

I have removed  "Extension Manager" dir

Apr 7, 2011 at 7:29 PM

Ok thanks

Apr 7, 2011 at 7:30 PM

Ok thanks