Reference confusion - manifest has multiple references to multiple versions of assembly

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

I'm having a problem with what appears to be some sort of confusion with
references. I have a single solution with a dozen projects which has been
working quite nicely for a while. The references between projects in the
solution were established through project references, not by browsing to an
assembly DLL. All of the projects are strongly named and use key files. Each
project's AssemblyInfo.cs specifies the assembly version, where the assembly
key file is and sets AssemblyDelaySign(true).

Here's where the problem started. There was an administrative decision made
to change the name of the assemblies, change the name spaces and to generate
new key files. Now things have stopped working for what appear to be some
confusion over the version of assemblies being consumed.

One symptom: There is only one version of an assembly, but if I look into
the manifest of a consumer of that assembly, I see two different references
to that assembly using two different public keys and slightly different
names.
The first one is ".assembly extern BCGI.CTSxCore"
The second is ".assembly extern BCGI.CTSxCore as BCGI.CTSxCore_6".

I don't know where the confusion is coming from and would greatly appreciate
it if someone could point me at a couple of likely reasons why this
confusion is being generated.

Another symptom: At build time, there are two different error lines that
say, in essence, that a dependency couldn't be copied to the run directory
because it would conflict with another dependency of the same name but a
different key token value.
 
R

Richard Lewis Haggard

I did not figure out why this happened, but it was fixed by deleting all of
the references and then re-establishing them. After that, the manifest for
each assembly cleared up and the duplicate references were gone.

Still - what happened? Why did changing the key files result in duplicate
(sort of) assembly references? This sort of implies that a reference is a
static entity that, once established, doesn't update or change in any
fashion automatically. Is that true?
 

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