One of the most common errors reported in the ASP.NET forums is the infamous "
BC30451: Name 'Config' is not declared" warning.
Eg
Description:
An error occurred during the compilation of a resource required to
service this request. Please review the following specific error
details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'Config' is not declared.
Source Error:
Line 77:
Line 78: Dim AutoUpgrade As Boolean
Line
79:
If Config.GetSetting("AutoUpgrade") Is Nothing Then
Line 80: AutoUpgrade = True
Line 81: Else
Source File: D:\Inetpub\wwwroot\intranet\Website\App_Code\Global.asax.vb Line: 79
Due to the poor searching capabilities of ASP.NET Forums, I have lost
count of the number of times I have answered this question, so I
decided it was a good topic on which to blog - thus giving me a known
link to which I can refer questioners.
The error is caused by the "web-project" not being able to find the DotNetNuke Class Library (DotNetNuke.dll).
There are two common causes for not being able to find the assembly.
1. In Visual Studio 2003 (for Visual Basic but not C#), the project
file contained a number of commonly used Imports statements - ie
Imports Statements that were used by all .vb files in the
project. As .NET 2 websites do not have a project file, these
default Imports statements have been moved to the web.config file.
eg
Thus if release.config has not been copied/renamed to web.config, the
compiler will not be able to find the "Config" class, as the project
does not have an Imports statement referencing the correct namespace..
2. If working with the Source release - the assemblies need to be
built, before the site can be run.. (This is normal behaviour for
source releases, (for instance Linux, Apache etc), although it is quite
surprising how many people expect the source package to work out of the
box).
EDIT** As this behaviour (no binaries in the /bin) is different from
3.x, we will probably release an updated package with the binaries
included.