title: How can a setup program check whether an assembly is installed in the GAC, and if so, its version?
body: <p>Title says it all... Preferably for Inno Setup. I found a couple of ways, but none seem particularly convenient.</p>
  
  <ol>
  <li><p>Using the directory structure of the GAC to check the DLL directly. This is not an official way and discouraged for various/obvious reasons.</p></li>
  <li><p>Using the <code>gacutil</code> program. Not part of the framework, only the SDK, and not likely accepted for redistribution.</p></li>
  <li><p>Using the <a href="http://msdn.microsoft.com/en-us/library/ms404523.aspx" rel="nofollow"><code>Fusion API</code></a> similar to gacutil. Requires COM interaction, but appears to be the officially favored way of doing what I'm after.</p></li>
  </ol>
  
  <p><strong>Edit</strong><br>
  Just a clarification: I want to check for the existence/version of a possibly already installed GAC assembly so I can determine whether all the requirements of my application are installed (or whether I need to run a separate installation that would install these assemblies).</p>