title: Generate manifest files for registration-free COM
body: <p>I have some applications (some native, some .NET) which use manifest files so that they can be <a href="http://msdn.microsoft.com/en-us/library/fh1h056h.aspx" rel="noreferrer">deployed in complete isolation</a>, without requiring any global COM registration. For example, the dependency on the dbgrid32.ocx com server is declared as follows in the myapp.exe.manifest file which sits in the same folder as myapp.exe:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  &lt;assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
    &lt;assemblyIdentity type="win32" name="myapp.exe" version="1.2.3.4" /&gt;
    &lt;dependency&gt;
      &lt;dependentAssembly&gt;
        &lt;assemblyIdentity type="win32" name="dbgrid32.ocx" version="5.1.81.4" /&gt;
      &lt;/dependentAssembly&gt;
    &lt;/dependency&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>The dbgrid32.ocx is deployed to the same folder, along with it's own dbgrid32.ocx.manifest file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  &lt;assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
    &lt;assemblyIdentity type="win32" name="dbgrid32.ocx" version="5.1.81.4" /&gt;
    &lt;file name="dbgrid32.ocx"&gt;
       &lt;typelib
          tlbid="{00028C01-0000-0000-0000-000000000046}"
          version="1.0"
          helpdir=""/&gt;
      &lt;comClass progid="MSDBGrid.DBGrid"
         clsid="{00028C00-0000-0000-0000-000000000046}"
         description="DBGrid  Control" /&gt;
    &lt;/file&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>This all works fine but maintaining these manifest files manually is a bit of a pain. Is there a way to generate these files automatically? Ideally I would just like to declare the application's dependency on a list of COM servers (both native and .NET) and then let the rest be generated automatically. Is it possible?</p>