Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Could not load type errors while publishing

Getting following errors after trying to publish using 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'.     

Any idea how to solve them

like image 224
sam Avatar asked May 20 '09 15:05

sam


1 Answers

There are several reasons why you would get Circular file references are not allowed error.

It is difficult to pin-point the exact cause without looking the project's structure or code.

However, if I were to take an educated guess, here's what I would do:

  • Looking at the next error: Unknown server tag 'uc2:FAQ'., it seems that it is not able to compile that user control.
  • It is also likely that this user control is the point of contention here. The rest being the result of UserControl not compiling.
  • If so, then check for any references to master page/any other page within the user control (something like <%@ Reference Control="~/app.master" %> within the ascx file).

Also, a not-so-obvious circular reference problem with user control happens when you unknowingly land into this situation (via batching):

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

If that is the likely cause, then try setting batch=false in your config:

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

Hope this helps.

like image 89
Mrchief Avatar answered Oct 12 '22 09:10

Mrchief