Hi Everyone
I was hoping someone could help me with a problem I seem to be having when I install modules. The problem is to do with the codeSubDirectories element in the web.config.
Let’s take an example, let’s say we have the following three modules
· Common
· Setup
· Routes
When I install these modules the web.config is appended with
<add directoryName="Common"/>
<add directoryName="Setup"/>
<add directoryName="Routes"/>
After installing the above modules the website seems to crash with an error
Compilation Error
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: BC30002: Type 'CompaniesController' is not defined.
Source Error:
|
Line 75:
Line 76: Public Function GetCompaniesByUser(ByVal UserID As Integer) As String
Line 77: Dim ctlCompanies As New CompaniesController
Line 78: Dim objCompanyInfo As CompanyInfo
Line 79: Dim arrCompanies As ArrayList
|
Source File: C:\MyIntranet\App_Code\Common\Globals.vb Line: 77
It seems that it can’t find the 'CompaniesController' which is defined in the Setup Module. So having read a few articles on MSDN I thought it may be the order in which the codeSubDirectories are listed.
So I reordered the entries to read as follows
<add directoryName="Setup"/>
<add directoryName="Common"/>
<add directoryName="Routes"/>
The website still crashes with the following error
Compilation Error
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: BC30456: 'Common' is not a member of 'Modules'.
Source Error:
|
Line 57: Dim UserCompanyList As String = ""
Line 58:
Line 59: UserCompanyList = MyCompany.Modules.Common.Globals.GetCompaniesByUser(UserID)
Line 60:
Line 61: If PageIndex = -1 Then
|
Source File: C:\MyIntranet\App_Code\Setup\Companies\CompanyController.vb Line: 59
From the above I conclude that it is now looking for the function GetCompaniesByUser(UserID) which is in the Common module
Is this a circular dependency issue?