We help IT Professionals succeed at work.

How to replace an assembly with strong name

gbzhhu
gbzhhu asked
on
Hi,

I have an winforms app that references an assembly (a dll).  The referenced assembly was built with a strong name and I have the .snk file.  The main application has been deployed to users for many years.  I made a small change to the referenced dll and replaced the older one on the client's machine.  That causes an error (not in my dev environment but on the client PC)

System.IO.FileLoadException: The located assembly's manifest definition with name 'Dbt.WinForms.Controls' does not match the assembly reference.

What do I need to do here?  I thought what I did was sufficient since I strong named the assembly again with the same .snk file as before!

Cheers
H
Comment
Watch Question

Commented:
Solved this.

Whoever build the dll I am referencing added AssemblyKeyFile attribute to the assembly.cs file AFTER they built the dll.  so previous dll have no strong name and new one I created has, hus the mismatch.

I used Fusion and Fusion Log Viewer and ILDASM to figure out.  This is the post that helped me.  http://www.hanselman.com/blog/CommentView.aspx?guid=3654c8f3-c5c3-4dee-a01f-c9a8da3ef2fa

Will close this now and hope it helps someone someday