views:

813

answers:

5

how do i use NAnt to build the msi file

thanks

A: 

Uh, what? Are you trying to create an MSI? In that case you'd want to trigger the build tool, perhaps Wix. If you're trying to run an existing MSI, the executable to use is called "msiexec".

Promit
A: 

i'm trying to create msi file by using NAntcontrib

is there anyway to do this?

please help

thanks:)

nikky
I guess you mean you're trying to use the NAntContrib msi build task. Am I correct?
MPritch
+3  A: 

You can use the Nant tasks provided with WiX, see this blog post and search for "Nant" in the WiX help file (WiX.chm)

Simple example from the above blog post for your reference, my own actual .build file is over 500 lines long and is mostly associated tasks such as building bootstrappers, extracting sources, code signing, integration with Lingobit for localization, etc, etc, etc. Building the actual MSI is possibly the simplest part of the code :)

<target name="package" description="Create the installer package">

  <property name="wix.dir" value="${base.dir}\WiX" />
  <loadtasks assembly="${wix.dir}\Microsoft.Tools.WindowsInstallerXml.NAntTasks.dll" />

  <candle out="${nant.project.basedir}\" exedir="${wix.dir}">
    <sources>
      <include name="MyApp.wxs" />
    </sources>
  </candle>

  <light out="MyApp.msi" exedir="${wix.dir}"
    locfile="${wix.dir}\lib\WixUI_en-us.wxl" rebuild="true">
    <sources>
      <include name="MyApp.wixobj" />
      <include name="${wix.dir}\ca\wixca.wixlib" />
      <include name="${wix.dir}\lib\wixui_featuretree.wixlib"/>
    </sources>
  </light>

</target>
sascha
A: 

Check out this other question http://stackoverflow.com/questions/427586/sample-request-msi-task-of-nant-contrib

MPritch
A: 

wixca.wixlib in the version of wix 3.5 ??? please.

estrella