2009-05-20 107 views
9

嘗試使用aspnet_compiler發佈後出現以下錯誤獲取無法在發佈時加載類型錯誤

errorASPPARSE: Circular file references are not allowed. 
errorASPPARSE: Unknown server tag 'uc2:FAQ'. 
errorASPPARSE: Could not load type 'CompoundControls.BBar'. 
errorASPPARSE: Could not load type 'CompoundControls.PPIndicator'. 
errorASPPARSE: Unknown server tag 'm:Calendar'. 
errorASPPARSE: Could not load type 'SharedUserControls.VCDetails'. 
errorASPPARSE: Could not load type 'SharedUserControls.VPDetails'. 
errorASPPARSE: Could not load type 'SharedUserControls.VPrDetails'. 
errorASPPARSE: Could not load type '.PopupPaymentCardCCVHelp'.  

任何想法如何解決它們

+0

這可能與CruiseControl.net無關:您能否從命令行調用與CCNet執行相同的MSBuild命令?當詳細程度設置爲DEBUG時,您可以看到它在構建日誌中嘗試調用的內容。 – skolima 2011-08-18 08:53:07

回答

1

有幾個原因,你會得到Circular file references are not allowed錯誤。

如果沒有查看項目的結構或代碼,很難找出確切的原因。

不過,如果我是採取一種猜測,這裏就是我會做:

  • 放眼下一個錯誤:Unknown server tag 'uc2:FAQ'.,它似乎無法編譯用戶控件。
  • 此用戶控件也可能是此處的爭用點。其餘的是UserControl沒有編譯的結果。
  • 如果是這樣,那麼檢查是否有任何對用戶控件中的母版頁/任何其他頁面的引用(類似於ascx文件中的<%@ Reference Control="~/app.master" %>)。

此外,與用戶控制不那麼明顯的循環引用問題發生時,你在不知不覺中降落到這種情況(通過batching):

PageA.aspx -> uc1.ascx -> PageB.aspx (batching) -> uc1.ascx -> PageA.aspx (batching)

如果是這樣的可能的原因,然後嘗試在您的配置中設置batch=false

<configuration> 
    <system.web> 
    <!-- should prevent errorASPPARSE: Circular file references are not allowed --> 
    <compilation batch="false" /> 
    </system.web> 
</configuration> 

希望這有助於。

+0

@sirrocco:這幫忙嗎? – Mrchief 2011-08-24 19:23:46