Circular Dependency on References

J

Jeff Connelly

We're getting this error and don't know where to find the problem. I assume
this is usually issued in the typical case where project A has a reference
to project B, and project B has a reference to project A. There is nothing
so obvious, and look at all the dependencies I've failed to find anything
that could be perceived as circular. Has anyone found any odd behavior or
have a suggestion for something non-obvious to look at?
 
M

Mark White

Please list out your projects and their references. Is it only Project A
and B?

Once that information is known, we might be able to help a little better.
Thanks.


Mark
 
J

Jeff Connelly

Mark White said:
Please list out your projects and their references. Is it only Project A
and B?

Once that information is known, we might be able to help a little better.
Thanks.

That would be difficult Mark. There are 37 projects and they each have
multiple references. The obvious response might be that with so many, there
must be a conflict in there somewhere. But I've gone through them all and I
just can't see anything. I was kind of hoping someone might say "Oh yeah,
when that happens the error message really means something else" or "Oh
yeah, VS can only handle references up to 36 projects and no more" :)
 
J

Jeff Connelly

Sahil Malik said:
VS2005?

Generally it can be solved as introducing a third project in the middle,
and use a file based reference that you manually copy over (or a post
build step), instead of a project based reference.

It's a messy thing though :)

But I don't even know which reference it's complaining about. It just says
"that would cause a circular dependency". Any way to find out what it
thinks the problem really is?
 
M

Mark White

Jeff

What makes you think it's something other than a circular dependency?

With 37 projects, I'd put good money on the CD.

When do you get the error message, when building?

Mark
 
J

Jeff Connelly

Mark White said:
Jeff

What makes you think it's something other than a circular dependency?

With 37 projects, I'd put good money on the CD.

When do you get the error message, when building?

I don't assume it's necessarily something else. But as a programmer with
some experience, I'm used to dealing with error messages that are
misleading. Combine that with the fact that I can see no circular
dependency, it's something I thought I should consider. I get the error
message from VS (2003) immediately when I try to add the reference to the
project.

I have something roughly like this.
A references B and C (plus a bunch of "System" stuff)
C references B.
D references B.
I'm trying to add D to references for A. Neither B, C or D reference A, of
course. B references only some System stuff.
 
M

Mark White

I tried setting up a solution as you outlined below. I have no issues
setting it up the way you described. Now, when I try to reference A from D,
then an issue exists of course, but you're not doing that.

Any other projects in the mix other than what you outlined?

Mark
 
S

SP

Jeff Connelly said:
We're getting this error and don't know where to find the problem. I
assume this is usually issued in the typical case where project A has a
reference to project B, and project B has a reference to project A. There
is nothing so obvious, and look at all the dependencies I've failed to
find anything that could be perceived as circular. Has anyone found any
odd behavior or have a suggestion for something non-obvious to look at?

I have read the other replies and would suggest the following. Grab a piece
of paper and write down the 37 projects. Check off the names of those that
are referenced by the project that you are trying to add a reference to.
Then go through that list and for every checked item, check off the projects
that are referenced by it and then cross out the name as you do this. Beofre
you are able to cross out all the names you are going to find yourself
checking off the name of the project you are having a problem with.

Let us know.

SP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top