开发者

Circular file references are not allowed. Publish ASP.NET (2.0) Website

开发者 https://www.devze.com 2022-12-20 12:13 出处:网络
When I re/build my ASP.NET website I do not receive any er开发者_JAVA百科rors. However when I PUBLISH the site, it gives me a \'Circular file references are not allowed.\' error.

When I re/build my ASP.NET website I do not receive any er开发者_JAVA百科rors. However when I PUBLISH the site, it gives me a 'Circular file references are not allowed.' error.

I read a little on the web about this, and it provided a batch='false' option, which I tried and does nothing.

The page, has a master page, which may call on the same control twice; however, this control does not refer back to anything

TY - Theo


Theo, I also received this error quite a few times which is very annoying, even though I searched for ages for circular file references I couldn't find any. In the end I decided that although there are no definite circular file references, the compiler did not like it when I referenced a control in a parent folder e.g. I have a control in the folder /UserControls/Panels/ManagerPanels/ which references a control in the folder /UserControls/Panels/. This works ok when coding but trying to publish or debug brought about the Circular file reference problem. Sorry to say the only solution I found was to move the referencing control back a folder into the same folder as the control it was referencing, this fixed the problem (although it is extremely frustrating as I like a nice folder structure for my controls, of which there are many). Hope this helps


The reason that batch=false won't fix anything is publishing a website precompiles it so the batch attribute is irrelevant.

You can get more details on the error by using the aspnet_compiler command. I think this only works if you've hosted your website locally in IIS.

aspnet_compiler -v /

The above command would precompile your website locally if it's running on port 80 and show you where the problems are.


If you have Project A and Project B in the same solution, and you add a reference from Project A to Project B and also a reference from Project B to Project A then you’ll get this error. References work like a parent\child relationship so a project cannot be both the parent and the child of another project.

You’ll need to work out where the circular reference is and maybe move some code around, or even create a new project in order to resolve it.


if you add multiple project, one project depend another one project means check your reference. if u gave circular form means that error will come

0

精彩评论

暂无评论...
验证码 换一张
取 消