I'm replying to the list because this isn't really a bug or a feature
request...

It appears as though you don't have a <features /> element defined. 
Also, you don't need to define the keyfile with the full path.  Only
the filename will suffice.

Further information about the msi/msm tasks can be found here:
http://nant.sourceforge.net/wiki/index.php/MSITask

Also this page has example scripts:
http://nant.sourceforge.net/wiki/index.php/samples%20for%20install%20tasks


The following script should be closer to what you're looking for.  At
least it builds correctly.
Note: I changed the keyfile and output directory because I didn't have
the files that you did.


<project name="msiSample" default="msi">
        <!-- Location to output the complete msi -->
        <property name="output.dir" value="." />
        <target name="msi" description="Builds a MSI install">
                <msi output="${output.dir}\Setup.msi" sourcedir="${output.dir}"
template="C:\Dev\NantContrib\bin\MSITaskTemplateVS.msi"
                        verbose="true">
                        <properties>
                                <property name="ProductCode"
value="{7521DBD5-8039-4686-800C-4644EE2ADEBA}" />
                                <property name="PackageCode"
value="{96D8AA97-72FB-48DB-80AE-CD1212B0A3E2}" />
                                <property name="ProductLanguage" value="1033" />
                                <property name="ProductName" value="Example" />
                                <property name="UpgradeCode"
value="{E0FA6633-7502-42E9-B3E0-EFF8026027CC}" />
                                <property name="ARPCONTACT" value="Example" />
                                <property name="Manufacturer" value="Example" />
                                <property name="ProductVersion" value="1.0.0" />
                        </properties>
                        
                        <directories>
                                <directory name="D_BINDIR" foldername="bin" 
root="TARGETDIR" />
                        </directories>
                        
                        <components>
                                <component name="Content"
id="{16B2FCA9-FD2D-41b3-A7C9-068CAF9A70AB}" directory="TARGETDIR"
feature="DefaultFeature" attr="2">
                                        <key file="license.rtf" />
                                        <fileset basedir="${output.dir}">
                                                <include name="license.rtf" />
                                        </fileset>
                                </component>
                        </components>

            <features>
                <feature name="F__DefaultFeature" title="Main Feature"
display="1" typical="true" directory="D_BINDIR">
                    <description>core files.</description>
                </feature>
            </features>
                </msi>
        </target>
</project>





















Your Original Question
______________________________________________________

 Trying to build an MSI File and I keep getting "Object
reference not set to an instance of an object".

Build Script:

<target name="buildMsi" description="Build MSI">
<msi output="${outdir}\deploy\Setup.msi"
sourcedir="${outdir}\deploy\WebSite"
template="C:\Nant\nightly\bin\MSITaskTemplateVS.msi"
verbose="true">
<properties>
<property name="ProductCode" value="{7521DBD5-8039-
4686-800C-4644EE2ADEBA}" />
<property name="PackageCode" value="{96D8AA97-
72FB-48DB-80AE-CD1212B0A3E2}" />
<property name="ProductLanguage" value="1033" />
<property name="ProductName" value="Example" />
<property name="UpgradeCode" value="{E0FA6633-
7502-42E9-B3E0-EFF8026027CC}" />
<property name="ARPCONTACT" value="Example" />
<property name="Manufacturer" value="Example" />
<property name="ProductVersion" value="1.0.0" />
</properties>
<directories>
<directory name="D_BINDIR" foldername="bin"
root="TARGETDIR" />
</directories>
<components>
<component name="Content" id="{16B2FCA9-FD2D-
41b3-A7C9-068CAF9A70AB}" directory="TARGETDIR"
feature="DefaultFeature" attr="2">
<key file="${outdir}\deploy\WebSite\global.asax" />
<fileset basedir="${outdir}\deploy\WebSite">
<include name="global.asax" />
</fileset>
</component>
</components>
</msi>
</target>


Any ideas what may be causing this?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to