views:

51

answers:

1

I've come upon this situation a few times before. I wish to reference a type in my XML comments, but the type is contained in an assembly not referenced by my project.

In A.Dll (references B.DLL):

using B;
///<summary>Hai I'm SomeClass and I use <seealso cref="B.LoserClass"/> to do my work</summary>
public class SomeClass {/*...*/}

In B.DLL (does NOT reference A.DLL):

///<summary> I can't <seealso cref="A.SomeClass"/> in this summary </summary>
public class LoserClass {/*...*/}

In the comments for LoserClass I need to reference SomeClass but I can't due to the fact that B.DLL doesn't reference A.DLL (circular reference).

Is there some way to include the assembly information in the cref within LoserClass' code documentation, so that A.SomeClass can be resolved by the XML documentation generator?

(btw, you can't always resolve this by moving classes as it can cause circular dependencies in other places)

+1  A: 

Hi Will,

I don't know a way to do this and I'm convinced it doesn't exist. The question is, for what reason do you want you refer in the comments from component B to A? B doesn't know anything of A, right? A uses B, so it makes sense to me, that the comments reflect this dependency too. But the other way around makes no sense to me.

That's just my humble opinion,

Prensen

Prensen
I don't want to go into details about it, but the reason why they are in this configuration isn't because they don't know each other, its because they have to be to avoid circular references. While they don't directly interact with each other, I want to document their interaction in the comments.
Will
I think this qualifies as a smell and am going to refactor this foolishness out of existance by combining assemblies that should have never been split apart in the first place.
Will