Assembly manifest mismtach & File or Assembly name not found

  • Thread starter Thread starter guxu
  • Start date Start date
G

guxu

I have a VB application referencing some C# dlls. Got new set of C#
dll assemblies, now kept getting errors when I run my VB application.
There were errors like assmbly reference mismatch. Also in debug mode,
it errored at New or CreateObject of the referenced COM object. I have
checked GAC and it looked good.

I guess what I am asking is what I need to do when I get a new build of
assemblies that my VB application is referencing to avoid those
mismtach or file not found errors.

Thanks.
 
The new C# assemblies probably have different assembly versions or strong
names. If you just replaced the old ones in the GAC with the new ones
you'll fail in both of your scenarios:

1. Calling via COM fails because the registration for .NET COM Dlls includes
assembly version and strong name (in the CLSID node in the registry) and
they don't match what's in the GAC. Regasm the new assemblies should be the
solution.

2. If you compiled a VB.NET program with build-time references to the old
assemblies, your code is bound to assemblies with the old assembly version
and strong name, so you'd need to recompile your .NET program using
references to the new assemblies.
 
Back
Top