Page view counter

"Circular file references are not allowed" after running RC Upgrade Wizard

Last post 12-10-2007 12:46 PM by skuli. 33 replies.

Sort Posts:

  • "Circular file references are not allowed" after running RC Upgrade Wizard

    09-26-2005, 8:07 AM
    • Loading...
    • BBuff
    • Joined on 09-25-2005, 11:03 PM
    • Posts 2
    • Points 10
    It seems as though I posted this in the wrong forum (VS 2005) yesterday, so here it is in the correct one.

    After running my site through the VS2005 RC Upgrade Wizard, I now have a ton of "Circular file references are not allowed" errors relating to my User Controls.  Any idea on how to solve this as the circular reference isn't obvious at all?

    Thanks in advance,
    Brian
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    10-06-2005, 9:06 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam
    A circular reference can be introduced when adding the Reference directive to tell the compiler where to find another page's class. For example, you could have Control1 refer to Control2, Control2 refer to Control3, and then Control3 refers back to Control1.

    The only way to break a circular reference is to take one of the controls and use the Abstract Base Class design pattern (see the Common Migration Issues and Solutions white paper as http://msdn.microsoft.com/asp.net/migration/upgrade/default.aspx for more detail).

    The migration wizard should be smart enough to detect this situation, but obviously it did not work on your code. We would love to take a look at your project and see if we can fix the wizard in a post-Whidbey release. If you are willing, please send your web app to 
    m b u n d @ m i c r o s o f t . c o m  and we'll take a look.

    Thanks,
    -Mike-

  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    10-14-2005, 1:26 PM
    • Loading...
    • Baiju
    • Joined on 09-17-2002, 7:07 PM
    • Posts 198
    • Points 990
    If you do not see any obvious circular reference, please try to add  batch=false in the compilation tag of web.config.
    "This posting is provided "AS IS" with no warranties, and confers no rights"
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    10-14-2005, 2:49 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam
    One additional note on batch=false -- this tells the ASP.NET compiler to not batch assemblies, and create an assembly for each web form and user control. When it is set to true, then the compiler will batch assemblies (in a non-deterministic way, but usually one per folder) which may hide broken references, including circular references. We recommend during development you run with batch=false, but for deployment set batch=true. This flag is set web.config, e.g.

    <system.web>
        <compilation defaultLanguage="c#" debug="true" batch="false">
        </compilation>
    </system.web>
    -Mike-

  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-07-2005, 1:22 AM
    • Loading...
    • mike123
    • Joined on 07-22-2002, 3:45 PM
    • Posts 704
    • Points 2,065
    I am getting this error too FYI


    mike123
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-07-2005, 2:45 AM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam

    Are you getting it when batch=false?

    -Mike-

  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-07-2005, 7:33 PM
    • Loading...
    • mike123
    • Joined on 07-22-2002, 3:45 PM
    • Posts 704
    • Points 2,065
    I took this setting off and its ok, however I want to set this for deployment ... Where can I read how to fix this ?
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-08-2005, 1:04 PM
    • Loading...
    • Baiju
    • Joined on 09-17-2002, 7:07 PM
    • Posts 198
    • Points 990

    For deploy ment you cando two things to fix this.
    1. If you precompiling you should be OK

    2. Identfy where the circular reference is coming from, normally when a file in Folder1 referring to a file in folder2 and totally different file in folder2 referring back to another file in folder1 you may see this. This is because by default all files in a folders tends to get built into single assembly. You can split some files into another folder to avoid this.


    "This posting is provided "AS IS" with no warranties, and confers no rights"
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-08-2005, 11:32 PM
    • Loading...
    • mike123
    • Joined on 07-22-2002, 3:45 PM
    • Posts 704
    • Points 2,065

    Forgive me but I am not sure what you mean by pre-compilling ? 

    It's building without errors when "batch=false" is on ..... However its riddled with errors otherwise.  Am I ok to use "batch=false" for a live website?  I don't exactly understand what this is doing.

    Thanks!
    mike123
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-09-2005, 2:59 PM
    • Loading...
    • Baiju
    • Joined on 09-17-2002, 7:07 PM
    • Posts 198
    • Points 990

    During compilation asp.net compiler try to batch some pages together to prduce a single assembly, By default all pages in a folder is built into a single assembly. so if  file1 in folder1 refer to another file2 in folder2 and  file1 in folder2 referring to file2 in folder1 can cause circular refernce issue.

    There are couple of way you can deploy the web to production server.
    1. Source deployment, you can copy your entire site to the production machine.
    2. Precompile, Use menu build->Publish website built assemblies are deployed in this case.

    If you have batch=false build process will be slower. Thats why if you use second method in this case.

    "This posting is provided "AS IS" with no warranties, and confers no rights"
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-09-2005, 5:36 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam
    Weird -- the reply I made this morning is missing!

    What I wrote is you should always deploy using batch=true. This will ensure your web app will work most efficiently when deployed, and will allow incremental compiling to work while in VS05.

    However, you have a rare situation hwere batch=true is causing a circular reference. You need to use Baiju's suggestion of separating your web forms / user controls into different folders in order to break up the circular reference.

    This issue is described in "common conversion issues" white paper which can be found at http://msdn.microsoft.com/asp.net/reference/migration/upgrade/

    The graphics there make it a bit easier to see what is happening, and the solution is listed there too.
    -Mike-

  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    11-29-2005, 5:22 PM
    • Loading...
    • sjd0103
    • Joined on 04-05-2004, 8:30 PM
    • Posts 86
    • Points 418
    I've looked at the white papers and read the resolutions to what looked like legitimate circular references.  My problem happens only when Publishing my Web project and it's only on user controls that reference the MasterPage.

    So, if my user control contains:
    <%@ Reference VirtualPath="~/MasterPage.master"%>

    I will receive a circular reference error when I Publish...I've tried batch=false in my Web.config but that does not help.  Also, the user controls are not in the same path as the MasterPage.master file.

    ANY help would be great!!
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    12-14-2005, 2:48 AM
    • Loading...
    • Rippo
    • Joined on 12-14-2005, 7:46 AM
    • Posts 42
    • Points 111

    Did you ever find a solution?

    I have got "circular file references are not allowed" when I try to deploy a project using the VS2005 Web Deployment Projects BETA. The webapp compiles fine in VS but when I depliy I get a this error message.

    Thanks

    HTH
    Rippo
    http://www.wildesoft.net
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    12-14-2005, 8:39 AM
    • Loading...
    • sjd0103
    • Joined on 04-05-2004, 8:30 PM
    • Posts 86
    • Points 418
    It sure would be nice if someone did post a "solution".  Batch=false slows compile time so much that it's not a realistic solution for development.  We've bypassed the issue by selecting "Use fixed naming and single page assemblies." and leaving batch=false when publishing.  I'm thinking there are a lot of people ignoring this issue.
  • Re: "Circular file references are not allowed" after running RC Upgrade Wizard

    12-14-2005, 12:02 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam

    Hello,

    This is puzzling. Could you please enter an MSDN feedback bug at http://lab.msdn.microsoft.com/productfeedback/ and submit a zip containing your web site (if possible) or at least the master page and a page or two that uses it? This will allow us to officially track the issue internally.

    Thanks!

    -Mike-

Page 1 of 3 (34 items) 1 2 3 Next >