Good news for those of you wanting GAC support with the installer tasks.  I
checked in some changes tonight to allow you to install assemblies to the
GAC folder.  I also modified the components a little so that a component can
be devoted solely to installing a registry entry.  Anyway, here are some
fragments on how to use the new functionality (yep, I actually documented
this in the tasks too!).  I'll try to post some more sample build files to
the wiki, as time permits (hopefully this weekend, early next week?).

So.. for GAC support, you have two options.  You can either specify to
install all assemblies (to the GAC) in a component or you can specify per
assembly.  It also supports the case where you want to install all
assemblies (into the GAC) specified in the component, except one or two.

This code fragment will install all files to the directory specified by
D__SAMPLEPATH.  Only the assembly MyOtherAssembly.dll will be installed to
D__SAMPLEPATH; all other assemblies will be only installed to the GAC.

<components>
  <component name="C__MainFiles" id="{D1812D7A-781E-4C15-A2A5-0C396869D6E0}"
attr="2" directory="D__SAMPLEPATH" feature="F__DefaultFeature"
installassembliestogac="true">
    <key file="Test.xml" />
      <fileset basedir="..\Source">
        <includes name="*.*" />
      </fileset>
      <forceid file="MyOtherAssembly.dll"
id="_4EB7CCB23D394958988ED817DA00B9D1" installtogac="false" />
  </component>    
</components>


Now, if you're interested in having a component that just controls
installing a registry entry, it is accomplished similarly to this:

<components>
  <component name="C__MainFiles" id="{D1812D7A-781E-4C15-A2A5-0C396869D6E0}"
attr="2" 
    directory="D__SAMPLEPATH" feature="F__DefaultFeature" >
      <key file="Test.xml" />
    <fileset basedir="..\Source">
      <includes name="*.*" />
    </fileset>
  </component>    
  <component name="C__RegistryEntry"
id="{06C654AA-273D-4E39-885C-3E5225D9F336}" attr="4"
feature="F__DefaultFeature" directory="TARGETDIR">
    <key file="R__822EC365A8754FACBF6C713BFE4E57F0" />
  </component>
</components>

<registry>
  <key path="SOFTWARE\${product.name}\" root="dependent"
component="C__RegistryEntry">
    <value id="R__822EC365A8754FACBF6C713BFE4E57F0"
value="${msi.guid.product}" />
  </key>
</registry>

A final note, I added another registry root called "dependent."  This is to
support registry keys dependent on install type (per-user/per-machine).


Jim




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to