Strong name assignment to a circular reference

J

John E.

How can I compile two projects with a circular reference while giving them a
strong name?

There is a project that we have that has two components that reference each
other e.g. A<->B thus creating A.dll and B.dll. I have a project (e.g. R
with an assembly name of Com.MyCompany.R.dll) that has to use this mess and
access A. So, R->A. Well, Com.MyCompany.R.dll is going in the GAC. It is
set for strong name (entry in the assembly pointing to my sn.exe -k
generated file). However, projects A and B are not strong named, thus R
won't compile until A and B are strong named.

So, I have given them a strong assembly name (e.g. Com.MyCompany.A.dll and
Com.MyCompany.B.dll). I have added the assembly reference to the key file,
and generated an sn.exe -k key for each, also. However, neither A nor B
will compile since each depend on the other to be already compiled with a
strong name. Other than commenting out all the references to each other (if
that would even work), what might I do to get R in the GAC?

Any help would be greatly appreciated.

Thanks,

-John
 
N

Nick Malik [Microsoft]

Unwind the circular reference.

Your post inspired a blog entry... see the solution at the link below:
http://blogs.msdn.com/nickmalik/archive/2005/03/18/398601.aspx

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
J

John E.

Thanks!

A funny note is that your blog was the exact issue... My mystical Project A
was our configuration library and and Project B was our logging library ;)

-John
 

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