DotNetNuke and BC30002: Type ‘{type}’ is not defined

I recently ran into this problem: I have a DotNetNuke module that logs activity via a previously installed module.  Several of my existing modules call the logging module without a problem, but then I created a new module and after I installed it I’m getting the error BC30002: Type ‘Log.LogController’ is not defined.

I scratched my head for quite a while on this one.  Looked all over the web without luck until I came across a note that caused me to investigate the web.config.  The suggested solution didn’t resolve the problem, but I did notice something else.  The new module that I had installed, using the DotNetNuke install process, was listed in the codeSubDirectories section of the Web.Config, but the Log module was not.

I had installed the Log module manually; meaning I just pushed up the files, ran the SQL script and added the extension and it’s controls by hand in the extensions section of DotNetNuke.  Since I installed it manually an entry in codeSubDirectories was never created.

On a lark, I manually added the Log module to the codeSubDirectories and my error went away.

Conclusion: When a custom module is listed in the codeSubDirectories section any custom module listed as a dependency in the manifest file must also be listed in the codeSubDirectories section.

Leave a Reply