Strange reference issue

E

Earl

I posted this awhile back in the CF forum and got no answer, so I'm posting
it here today in hopes that a broader group of developers might nudge me in
the right direction.

I'm getting a weird message with a reference to an assembly I created, have
used in the past and then upgraded.

Warning: The dependency 'ReplSet, Version=1.0.1951.254, Culture=neutral' in
project 'CPN' cannot be copied to the run directory because it would
overwrite the reference 'ReplSet, Version=1.0.1991.23034, Culture=neutral'.

I've even done a search for all copies of ReplSet and none exist on my
system with a version number ending in .254. I do have the .23034 version
(which is the latest).

Nor can I find any reference to .254 in the project -- except when I try to
add .23034.

How can I track down where this reference to .254 is coming from?
 
A

Armin Zingler

Earl said:
I posted this awhile back in the CF forum and got no answer, so I'm
posting it here today in hopes that a broader group of developers
might nudge me in the right direction.

I'm getting a weird message with a reference to an assembly I
created, have used in the past and then upgraded.

Warning: The dependency 'ReplSet, Version=1.0.1951.254,
Culture=neutral' in project 'CPN' cannot be copied to the run
directory because it would overwrite the reference 'ReplSet,
Version=1.0.1991.23034, Culture=neutral'.

I've even done a search for all copies of ReplSet and none exist on
my system with a version number ending in .254. I do have the .23034
version (which is the latest).

Nor can I find any reference to .254 in the project -- except when I
try to add .23034.

How can I track down where this reference to .254 is coming from?

This problem was making me go crazy too because I also didn't find an
assembly with the version number shown by VS anywhere. A very short time
ago, I think I found the problem: The assembly does not exist anymore, but
you must have an assembly that was compiled when that assembly with that
version was existing. This is because every assembly contains a list of
"referenced assemblies" including their version numbers. Solution: Compile
all assemblies that referenced the old version. Compile the assemblies
referencing the assemblies that you just have compiled...and so on. Short:
Compile *all* higher layers bottom up if the version changed in a lower
layer. Do this even if only the version changed but no content. You should
consider setting a fixed version number if there is no contradiction to your
versioning policy.

BTW, you can find out the assemblies referenced by an assembly by writing a
small tool that loads the assembly using reflection and than call the
assembly object's GetReferencedAssemblies method.

Armin
 
E

Earl

Thanks for your reply and insight Armin. I will work on this and let you
know the outcome.
 

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