Avatar of papalarge
papalarge

asked on 

Cannot find the assembly error... looking for a previous version of a .dll

I have a VB.NET server app and client app that are both using the same .dll for communication. I've built the project, gacutil'ed it to add it to the global assembly cache... I'm up to .dll version 1.2.6 right now.

When I run the client, I get an error during one of it's methods that says:
"Cannot find the assembly SMailMan, Version=1.2.2.0, Culture=neutral, PublicKeyToken=....."

I think I've removed all references I have to this, uninstalled old assemblies, deleted the solution file, and re-built the project. Nothing gets rid of this reference to version 1.2.2.0 of the old assembly.  How could this be happening, and how can I fix it?
.NET ProgrammingVisual Basic.NETEditors IDEs

Avatar of undefined
Last Comment
igor_alpha
Avatar of papalarge
papalarge

ASKER

More pieces to the puzzle... if I open the two solutions on a different machine (the other one I was working on), it gives me the exact same error, however is looking for version 1.2.1 instead of 1.2.2.  On both machines, I uninstall / install the new dll's each time, so I don't know how old copies or references could be lying around.

I've looked through the registry editor for old copies... nothing.  I've looked in the C:\WINDOWS\assembly folders, and both machines have the correct versions in there...
ASKER CERTIFIED SOLUTION
Avatar of igor_alpha
igor_alpha

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of papalarge
papalarge

ASKER

I ensured that the correct version of the assembly is in both .vbproj files...

Tomorrow I will use /if with the gacutil tool, and make sure that's not causing the problem.
Avatar of papalarge
papalarge

ASKER

I can't believe it... the second option worked, igor_alpha!

So what exactly was happening there?  Each time I'd gacutil.exe the file, I'd uninstall the previous version(s) using "gacutil.exe -u".  Why wouldn't that take care of it?  What makes the "-if" necessary?
Avatar of igor_alpha
igor_alpha

/if - Installs an assembly into the global assembly cache. If an assembly with the same name already exists in the global assembly cache, the tool overwrites it.

Specifying this option is equivalent to specifying the /i and /f options together.

Usually uninstalling and then installing new version is enough. Probably in your situation it was not enough, don't know why.  
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo