title: How can I edit the "Public Key or Token" field of the Manifest embedded in a DLL or EXE file?
body: <p>I'm trying to resolve the following problem:
  [.Net 2.0, CLR 2.5.something, 64 bit machine, all DLLs and EXEs appear compiled for "Any CPU" according to corflags ] </p>
  
  <p>I maintain a legacy application  which uses a 3rd party DLL. 
  Out of the blue (as far as I can tell) the functionality depending on the DLL stopped working on one of the machines its deployed at, with the following error:</p>
  
  <p><em>Could not load file or assembly 'Interop.Merge70, Version=7.0.0.0, Culture
  =neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.</em></p>
  
  <p>I've viewed the manifest of the DLL as well as the AssemblyRef (used the ildasm tool) in the application's exe file, and the single difference I could find is that the DLL is strongly-signed(?) but according to the AssemblyRef the DLL is unsigned. Now, putting aside the fact that if this is the problem -how did this work till now? (as I only have the user's word for that ;-) )</p>
  
  <p><strong>How can I edit the app's manifest to change the AssemblyRef to be signed with it's public key as appears in the DLL's Manifest?</strong>
  (Also, as scarily enough I haven't got the code for the legacy version, I'm ideally looking for both exe-editing solution as well as something for VS2008 for the current version of the app)</p>
  
  <p><strong>Update</strong> turns out that in the current version -the one I do have the code for-the "key or token" field in the code that uses the 3rd party , contains the correct token as extracted by "sn -Tp 3rdparty.dll".. but the same error is thrown when running ... <strong>What am I missing here?</strong></p>