Last post Dec 10, 2007 04:46 PM by skuli
Sep 26, 2005 12:07 PM|BBuff|LINK
Oct 07, 2005 01:06 AM|mbund|LINK
Oct 14, 2005 05:26 PM|Baiju|LINK
Oct 14, 2005 06:49 PM|mbund|LINK
Nov 07, 2005 05:22 AM|mike123|LINK
Nov 07, 2005 06:45 AM|mbund|LINK
Are you getting it when batch=false?
Nov 07, 2005 11:33 PM|mike123|LINK
Nov 08, 2005 05:04 PM|Baiju|LINK
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.
Nov 09, 2005 03:32 AM|mike123|LINK
Nov 09, 2005 06:59 PM|Baiju|LINK
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.
Nov 09, 2005 09:36 PM|mbund|LINK
Nov 29, 2005 09:22 PM|sjd0103|LINK
Dec 14, 2005 06:48 AM|Rippo|LINK
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.
Dec 14, 2005 12:39 PM|sjd0103|LINK
Dec 14, 2005 04:02 PM|mbund|LINK
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.
Dec 14, 2005 05:22 PM|tinghaoy|LINK
sdj0103, where is your usercontrol defined? I think it's likely that you have some pages at application root that references this usercontrol in a separate folder, and that usercontrol references the masterpage in the root folder, therefore this causes the
If this is the reason, you should consider moving masterpage file to a different folder than the root or usercontrol. Thus the pages and usercontrol can both depend on the masterpage batch assemblies without the circular reference.
If this does not solve your problem, could you send me your repro files so I can investigate?
Dec 15, 2005 01:49 PM|sjd0103|LINK
Our user controls are a couple of directories in (/xxxproj/UserControls/) from the root. The masterpage was in the root, but by your advice I moved it over to a new directory. I changed all references (563 occurrences) to the new location and still have
the same circular reference error when I build with batch=true. The error points to user controls with the directive:
Our project is enormous, so sending the solution isn't an option. There's probably something we're not seeing that has not been identified as an issue...we'll get there.
Dec 15, 2005 05:12 PM|mbund|LINK
I still recommend you enter an MSDN feedback bug and include your current folder structure, a sample user control and the master page. This will allow us to review it with the whole team (including Ting) and track it officially.
Dec 16, 2005 10:42 AM|Rippo|LINK
Have submitted my solution to MSDN Online FDBK42439
Circular file references are not allowed" when using deploying using VS2005 Web Deployment Projects BETA
Dec 16, 2005 11:44 PM|mbund|LINK
Jan 25, 2006 12:06 AM|sjd0103|LINK
What was the outcome of the analysis on the submitted files?
We're now using VS 2005 RTM and trying to publish via the new WebDeployment Project and configurations other than release and debug. Of course now the "Circular file references..." error is back.
Jan 25, 2006 03:30 AM|ScottGu|LINK
Would you be able to send me mail directly at:
firstname.lastname@example.org with details on the exact error and when it happens? We can then kick off a mail thread with several folks on the team to help you through with this.
Jan 25, 2006 05:17 PM|tinghaoy|LINK
Investigating the previously submitted files, we did find a circular reference in the user app. I don't remember the specifics, but I believe it was in the format that is similar to
Folder a contains:
Page a (references Usercontrol b)
Folder b contains
Page b (references Usercontrol a)
This is a circular reference : page a -> usercontrol b -> page b (batching) -> usercontrol a -> page a (batching)
Note that this could happen in different variation if the folder contains a page that references another page (or usercontrol, masterpage) which in terms reference some other page in the same original folder. The bottom line is, to completely avoid this
issue, we recommend that you move any files that can be referenced into a separate folder.
Jan 27, 2006 02:10 AM|sjd0103|LINK
Scott and Ting,
Thank you for your help! I've resolved the issue by moving offending controls to new folders. I see now how the circles were produced. We have so many user controls...luckily I only had to move 6 of them in order to get us by. Now, if I could get someone
to help out with this... http://forums.asp.net/1177169/ShowPost.aspx...our build automation would be in good shape!
Jan 27, 2006 06:42 AM|tinghaoy|LINK
Sure, I am glad we work this out. I will reply to the build issue from the other thread.
Feb 01, 2006 06:27 PM|LS_|LINK
I tried to convert an ASP.NET 1.1 project and I had the same problem.
The problem analysis lead me to one conclusion: the ASP.NET 2.0 project should have an option to compile all the files into one DLL, just like in ASP.NET 1.1
I tried to measure the conversion cost, and it will be hard to eliminate all the circular references.
Since circular references inside one assembly are possible, and some of the logic in our classes was and is based on that, the option of one DLL per Web Project seems to be valid.
Feb 02, 2006 12:12 AM|Baiju|LINK
You have couple of options.
1. Turn batch compilation of in web.config and use publsh web feature for deployment.
2.Fix circular references manually
3. Use web application projects
4. Use Web deployment projects
Feb 02, 2006 12:29 AM|ScottGu|LINK
We recently announced our plans to release a new VS Web Project Option that we are calling VS 2005 Web Application Projects. It provides the ability to compile the entire project into a single assembly/dll -- just like VS 2003 did.
We released a preview build in December that you can download today from
http://webproject.scottgu.com. We are going to be updating this next week (probably Wednesday) with a newer build with more features.
The nice thing about this option is that you do not need to change any code from your VS 2003 project to take advatnage of it. Migrating an existing VS 2003 web project to it should only take about 15 minutes. You can follow these steps (once you download
and install it) to migrate your project forward:
Based on the issues you identified above, I'd strongly recommend you follow this option to upgrade. I think you'll find it relatively painless -- and give you the same experience you had in VS 2003.
Feel free to send me mail directly (email@example.com) if you run into any issues.
Feb 02, 2006 11:33 AM|LS_|LINK
I’m glad to ear about your new VS.NET 2005 Web Project option.
Even so, the ASP.NET 2.0 Converter is acting as a Code Inspection Tool , showing code / logic problems. We’ll use it to improve our Web Application code, and try to conform it to the new rules, so we can take
advantage of the new features.
Despite that, with the new option, it would be much easier to convert the application, if we need to do it fast and without major changes.
I’ll try to convert it, with the new option.
Sep 29, 2006 05:03 PM|MikeHanson|LINK
I would like to suggest that there is something wrong with the logic of the designers relating to this issue. I spent several hours trying to trace just three instances of the error discussed in this thread, and feel very frustrated by that wasted effort
because I do not think there is anything wrong with the structure I had in place for my web application.
I always try to take a modular approach to my development and create features in a way that can be re-used, even if it is not practical to put them in a component such as a server control.
I wanted to add a News module to my web app, which included support for Newsletters. Thinking this could be used elsewhere I started out adding a folder "News" to my web project, in which I would create all of the pages and user controls I had in mind.
I always put my Master Pages in a folder called MasterPages (strangely enough) so I had the following structure
Wanting to have a rotating news panel in the left column of every page on my site I added a reference for NewsPanel.ascx to both master pages. All of the pages in the News folder reference the TwoColumn.master master page, so on building the site I got
the circular reference errors.
To resolve it I moved my NewsPanel.ascx user control to another folder (UserControls). My original plan was for a simple copy of a single folder to deploy the News module to another application, which I think is a perfectly reasonable expectation, but now
that this problem has materialised I cannot do that without having to use methods/configurations that are not best practice and sacrifice performance, and I don't understand the logic of designing a product with these limitations.
I appreciate that templates are being shipped that address these issues, but question why they are there in the first place. IMHO it should be an obvious requirement that MasterPages can reference any user control from anywhere in the application hierarchy,
and any page anywhere in the hierarchy should be able to reference any master page. Therefore the default compilation mode should have permitted this, instead of us having to work around the issue.
Apr 24, 2007 09:51 PM|CharlieCSharp|LINK
I just wanted to provide some additional feedback based on my experiences with the circular file references problem. First of all, I have experienced this problem repeatedly even in Visual Studio 2005 where zero conversions are involved. I have spent a
great deal of time trying to identify folder hierarchies that will avoid this condition based on the recommendations by the ASP.Net team(s). I still get this error even when I follow the guidelines strictly. The most non-obtrusive form of this error will report
the "circular error" during a Solution Rebuild, but then mysteriously disappear on a consecutive Solution Build. The only way I have found to eliminate it completely is when I place all user controls in a separate root-level folder within the website hierarchy.
Apr 27, 2007 07:22 AM|Shrikaant|LINK
Hi, I also experienced the same problem while migrating from 1.1 to 2.0 . My scenario was that
In my ascx their was a reference for aspx which was using that ascx.
So i just deleted that Reference line from ascx file and now it worked fine.
Jun 14, 2007 05:53 PM|amaramrahul|LINK
Hi, one of my clients had faced a similar problem. After referring http://msdn2.microsoft.com/en-us/library/aa479312.aspx#issue3, I checked the option "Generate fixed name single assemblies" and tried to publish the website as I felt generating single assemblies
will remove the circular references. As expected, the site got published successfully. But in the bin directory, there were many dlls. Though the problem has been solved, I would like to know if this can be an acceptable solution as I feel having so many dlls
will affect the performance of the web application. Kindly confirm.
Dec 10, 2007 04:46 PM|skuli|LINK