tags:

views:

39

answers:

3

Hello everyone,

I have been tasked to fix someone else application where there is a Circular File Reference. I found some pointers as a work around, like modifying the bacth settings etc. However I need to get rid of it completely. The application contains close to 300 files. Web Pages, Classes and User Controls in all mixed folders. I hopefully found one of the class that was inheriting from a web page, making it a base class. That class is used in multiple web pages the proper way it should. But that class is also imported/using into other classes and user controls. Could that be THE problem? I am currently slowly modifying the files that are importing the base class, however before I hit the 200+ files Am I in the right direction?

What's your thought!

Many thanks in advance.

A: 

If a page is used by other paper it is good to:

  • Defined an interface that has the methods that other pages use.
  • Make the first page implement that interface
  • Make all the other pages use the interface rather than the first page class It is even better if a page class is never used by another class apart from a subclass.

However you fit you Circular File Reference problem, you have to track it down and understand it before you start making changes! Doing clean builds may help, likewise delete the contents of “bin” directories etc.

Ian Ringrose
A: 

If it's any help, I've had similar problems where there were user controls in one directory that used user controls from another directory. This can lead to build issues depending on the order the compiler decides to work through the directories...

Paddy
A: 

Ian, thanks for your reply. Unfortunatly it seems that I will have to visit every page and make the proper references.

@Paddy, it is exactly the case. I have several user controls in the same directory where one control is used in several other controls. It is also used by other controls from a different directory. I have tried to re-create that control in the other directory w/o any success. Using that new contorl that just diplicate the rpevious one doens't fix the circular reference, unfortunatly.

I have chnaged almost 100 files so far and I believe this will get fixed magically soon as all invalid rweference will be removed. Hopefully I should be done in an hour or so :)

Thanks again for your reply.

Mario