title: Why does regasm.exe register my c# assembly with the wrong GUID?
body: <p>I've got a c# assembly which I'm invoking via COM from a Delphi (win32 native) application.</p>
  
  <p>This works on all the machines I've tested it on, except one.</p>
  
  <p>The problem is that the Delphi application gets "Class not registered" when trying to create the COM object.</p>
  
  <p>Now, when I look in the registry under <code>HKEY_CLASSES_ROOT\DelphiToCSharp\CLSID</code>, the GUID listed there is not the same as the assembly Guid in AssemblyInfo.cs. It should be the same - it IS the same on all the other computers where it's installed.</p>
  
  <p>I have tried <code>regasm /unregister delphitocsharp.dll</code>, and that removes the registry key. Then if I do <code>regasm delphitocsharp.dll</code>, the registry key returns, but the GUID is the same as before (ie. wrong), and Delphi still gets "Class not registered".</p>
  
  <p>DelphiToCSharp.dll on the working machine is identical (verified with md5) to the version on the non-working machine.</p>
  
  <p>All I can think of is that an old version of the dll was registered before, and there still exists some remnant of that file which is making regasm confused.</p>
  
  <p>How can I fix or at least further diagnose this issue?</p>