views:

100

answers:

1

What is the protocol to share a namespace between two projects when consequential projects will reference both of the namespaces?

Obviously this is possible (System, mscorlib)...

I've gotten different errors depending on the things I've tried. Right now I have two projects Blueprint and Domain that share the MainApp namespace (for instance Blueprint has MainApp.IEntity and Domain has MainApp.EntityImpl). They are both referenced by a third project, Repositories. Repositories relies on both IRepository (in Blueprint) and EntityImpl (in Domain). Blueprint builds first, followed by Domain and then Repositories. For every reference to a class in the Domain project, I get a "The type or namespace name Domain does not exist in the namespace 'MainApp' (are you missing an assembly reference?)...

The assembly references are all correct.

I made sure there was a common assembly name between all the projects and adding an AssemblyInfo class in one of them with 'add link references to the root. This did nothing, and so I removed it.

I could merge these two projects, but there are circumstances in which that would be detrimental. I appreciate any guidance y'all can offer.

In response to the comment, Blueprint has no inter-project references, Domain has a dependency on Blueprint *Repositories has a dependency on Blueprint and Domain*

I have done all the deleting the dlls, building rebuilding cleaning repeating..no dice..

A: 

Open both the dlls in reflector & flatten the namespaces (view -> options -> browser -> flatten namespaces).

See if that helps you figure out the reason of the problem.

shahkalpesh
It wouldn't let me load them both at once.
smartcaveman
I also have all the assemblies signed with a common key, but it doesn't seem to help.
smartcaveman
shahkalpesh
I still can't figure it out. But after 6 hours of frustration I decided to combine assemblies temporarily to make the deadline. I am still hoping someone produces an answer for this...
smartcaveman