Monday, June 27, 2005

Circular project dependency in Java and .NET

In one of my .NET projects, we landed up in a situation where there was a circular compilation dependency between 2 projects. It would tough to compile both the projects...so we resorted to first commenting out some code in the second project and then compiling and getting a "dummy" dll which we can use furthur for compilation.

But VS.NET can automatically take care of such circular dependencies...The trick is very simple. Just add both the projects to a common solution. And in the 'Add Reference' option, do not add the DLL directly, but add the 'Project' as a reference. (3rd Tab in Add Reference window)
The VS.NET environment automatically takes care of circular dependencies.

Similarly in Java, the javacc compiler automatically takes care of circular dependencies. :)

No comments:

Post a Comment