尝试使用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 :(得分:1)
导致Circular file references are not allowed
错误的原因有多种。
如果不查看项目的结构或代码,很难确定原因。
然而,如果我采取有根据的猜测,这就是我要做的事情:
Unknown server tag 'uc2:FAQ'.
,似乎无法编译该用户控件。 UserControl
未编译的结果。<%@ 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>
希望这有帮助。