Assembly versions conflict

  • Thread starter Thread starter Vadim Berman
  • Start date Start date
V

Vadim Berman

Hello group,

It might be more IDE problem of MS Visual Studio, but maybe not. I have two
solutions, while one uses assemblies generated by the other. The source
solution compiles smoothly, but the destination sometimes issues errors. It
says that it cannot copy the assembly to the run directory because the
copied assembly version is older (the difference is usually the five last
digits). What's even stranger, the errors are about the assemblies from the
same solution, which I have linked as projects (and therefore, MSVS manages
the copy process automatically, which is reliable, right? :-) ). I tried
deleting all the assemblies and recompiling from scratch numerous times,
boots, restarting Visual Studio. Doesn't help.

I launched a search for every version of these shadow assemblies; I found
that Visual Studio keeps it in a special temporary files folder in Documents
and Settings; I also searched the GAC. They are not there!!!

Now, the program still runs even from the IDE, but I'm not sure which
version the darn monster runs. Anyone has an idea why this happens? Or maybe
I should reset some configuration files (there are no application config
files)? Help, I'm going nuts.
 
When you add reference to a DLL to your project, it adds a reference to the
exact version of that DLL. When you build, it copies that DLL to your
output directory. If the DLL it copies is a newer version than what was
added to the project, you will get the version warning. The program will
run using the version that is in the project output directory. To remove he
warning, remove the DLL reference from your project,a nd re-add it so it
points to the latest version of the DLL.

All the above assmes that you haven't strongly named your DLLs.
 
Mike,

Thanks for the advice, but I tried it before - didn't help...

However, I found that there was another external DLL I've been linking from
the \bin subdirectory. Changing its location did the trick.

--
Vadim Berman
www.Power-Components.NET
-----------------------------------------
Powerful components for powerful applications


Mike Bird said:
When you add reference to a DLL to your project, it adds a reference to the
exact version of that DLL. When you build, it copies that DLL to your
output directory. If the DLL it copies is a newer version than what was
added to the project, you will get the version warning. The program will
run using the version that is in the project output directory. To remove he
warning, remove the DLL reference from your project,a nd re-add it so it
points to the latest version of the DLL.

All the above assmes that you haven't strongly named your DLLs.
 
Back
Top