This probably sounds like a stupid question, but I'm going to give it a shot anyway.
So in Visual Studio, you can't have two projects X and Y such that X references Y and Y references X.
In general, I can totally understand how having a circular dependency can be problematic, for a variety of reasons.
But is it really not possible to compile two projects that are interdependent in this way? It seems to me that it must be possible, since (in my mind -- maybe I'm completely off-base about this) having two mutually dependent assemblies is really not so different from having two mutually dependent classes -- a case which is legal and can be compiled.
It would make sense to me if you said, "two assemblies cannot depend on each other because the compiler could not compile one before the other"; except that it seems you could make the same argument for two classes within the same assembly, and clearly the compiler can deal with this scenario just fine.
Basically the reason I'm asking is not that I have some desperate desire to do this thing that I know is generally ill-advised anyway. Specifically I'm wondering because it would be nice if I could have two projects -- say, MyProjectCS and MyProjectVB -- that existed basically as two mutually dependent parts of a single unit, and were only separate because certain parts were written in C# and other parts were written in VB.NET.
So, my question is (yikes, three-fold):
- Is it possible to enable this behavior (in Visual Studio, or elsewhere, for that matter)?
- If it's not possible within any IDE, it it at least theoretically possible, or could mutually dependent assemblies not possibly exist?
- If it's not even theoretically possible, why not? In other words, how are mutually dependent assemblies different from mutually dependent code within a single assembly?