title: Check if DLL is authentic/correct before running application i C# / .NET
body: <p>Hi I am trying to figure out how to make sure that a supplied DLL is the correct one.
  Reason is that our distributed solution is build of many small DLL's each containing certain portions of application and sometimes we roll out a new version of some of these.</p>
  
  <p><strong>Its not a "update problem", but merly - how do we check if:</strong></p>
  
  <ol>
  <li><p>its the correct binary/assemble</p></li>
  <li><p>the customer/client had tampered with the file and perhaps replaced it with one of the same name with similar functions to return bad values?</p></li>
  </ol>
  
  <p><strong>Multiple reasons</strong></p>
  
  <p>This could be used for copyprotection/licens test or other important validation issues, so I'm trying to figure out if MD5 checksum + some sort of assemble info is enough? (if so, how to gain access to assembly details or similar?)</p>
  
  <p>Ofcause nothing is failsafe, when you CAN decompile .NET DLL's, but exactly therefore we want to make sure that someone doesnt just decompile our functionlist and then writes there own replacement DLL of our "oooh so important" DLL's.</p>
  
  <p>Our reason is the amount of trouble debugging/supporting needed, when we get customers who have destoryed these by error or purpose (we dont care about the reason, we just try to prevent most of the possible errors).</p>