我正在嘗試爲Microsoft Visual Studio 2010中的ASP.NET Web應用程序同時爲幾個不同的項目設置構建環境。我使用IIS 7.5作爲後端服務器。我在所有三個項目中都遇到了同樣形式的編譯錯誤,並且存在一些輕微的背景差異。通過在VS 2010中構建生成的錯誤消息如下(我添加了#號,以便我可以分別引用它們中的每一個)。什麼是「無法加載類型<Namespace>。<Module>」是什麼意思?
Could not load type 'divFetch.Global' (#1)
Could not load type 'OrderAdmin.ContractorProductivity' (#2)
Could not load type 'Ticket.forms.Ticket_summary' (#3)
爲了便於參考,我使用以下頁面指令(所有在對應於上面提到的那些文件中定義的,具有的.aspx擴展[除#1的.asax]):
<%@ Page language="c#" Codebehind="pleasewait.aspx.cs" AutoEventWireup="false" Inherits="Ticket.pleasewait" %>
<%@ Page language="c#" Codebehind="LogTicket_summary.aspx.cs" AutoEventWireup="false" EnableViewState="true" Inherits="Ticket.forms.Ticket_summary" %>
<%@ Page language="c#" Codebehind="ContractorProductivity.aspx.cs" AutoEventWireup="false" Inherits="OrderAdmin.ContractorProductivity" %>
<%@ Application Codebehind="Global.asax.vb" Inherits="divFetch.Global" %>
其中,我注意到Resharper用紅色突出顯示了'divFetch.Global','ContractorProductivity'和'Ticket_summary','OrderAdmin'和'Ticket.forms'以藍色突出顯示。
我已經看過"Could not load type [Namespace].Global" causing me grief和Could not load type 'XXX.Global'但這些都沒有爲我工作(至少現在還沒有)。所以我想問一個不同的問題:爲什麼這個錯誤首先出現?
在#2和#3的情況下,當「Ticket.pleasewait」等其他模塊很好時,爲什麼Visual Studio不喜歡這些特定模塊?
是您的網站編譯或爲網站? – Dalorzo
這是一個網站。 – stephen