Hi Bill,
Thanks for you help. It indeed helped
particularly, when I was not able to find any relevant examples.
Now, the build is successful, but the msi
file is unable to install.
Error msg: “Error opening Sourcelist
key. Error:’87’”.
I guess it is because, it can not find the
source files. I tried to play around with the file targets, but didn’t
help.
Any ideas?
Your help is much appreciated Bill.
Sush
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 01, 2006
7:58 PM
To: [EMAIL PROTECTED]
Cc:
[email protected]
Subject: Re: [NAnt-users] Building
MSI files using NAnt Contrib
Hi Goel,
Yes, you need some nested elements
to the <msi> task. At a minimum, I think you'll probably need
something the snippet below. The documentation on the <msi> task
assumes that you already know a bit about the windows installer database.
A good starting point for this if your not familiar with it is the
Microsoft site
(http://msdn.microsoft.com/library/en-us/msi/setup/installer_database.asp). The
<msi> task is basically a wrapper that inserts data into the database.
Once you understand the database structure, then the elements of the task
all make a lot more sense.
If you are going to do any serious
installer work, then I found it's also worth installing the Platform SDK
Installer bits. This is a free download from the microsoft site if you don't
have MSDN, just go to http://msdn.microsoft.com and search for Platform SDK.
It comes with a useful tool called ORCA that lets you view the MSI
databases you create, and can be helpful at times for comparing the way they
get generated from VS compared to via the <msi> task. When you come
to test your install, you can also use the msiexec command line interface to
get debug onformation and there's a diagnostic tool in the SDK for viewing the
log file. (WiLogUtl.exe)
HTH,
Bill
<msi sourcedir="."
output="install/HelloWorld.msi" debug="true">
<properties>
<property name="ProductName" value="Hello World" />
<property name="ProductVersion" value="1.0" />
<property name="Manufacturer" value="My Company" />
<property name="ProductCode" value="A guid value" />
<property name="UpgradeCode" value="A guid value" />
</properties>
<components>
<component name="C_MyComponent" directory="TARGETDIR"
feature="F_MyFeature" id="{a guid value}"
attr="0" >
<key file="HelloWorld.dll" />
<fileset basedir=".">
<include name="HelloWorld.dll" />
</fileset>
</component>
</components>
<sequences>
<sequence type="installexecute" action=""
condition="NOT TARGETDIR" value="120" />
<sequence type="installexecute" action=""
condition="" value="1" />
<sequence type="installui" action=""
condition="NOT TARGETDIR" value="120" />
<sequence type="installui" action=""
condition="" value="1" />
</sequences>
<launchconditions>
<!--
Check the framework is installed. -->
<launchcondition name="CheckFramework"
condition="MsiNetAssemblySupport">
<description>This applicaiton requires the Microsoft .NET
framework. Please install the framework first, then re-run this
install.</description>
</launchcondition>
</launchconditions>
<features>
<feature name="F_MyFeature" title="My Feature"
typical="true" display="1" directory="TARGETDIR"
attr="8">
</feature>
</features>
</msi>
|
From Sushant Goel <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by:
[EMAIL PROTECTED]
01/03/2006
06:49
|
|
Hi
All,
I have been trying to generate MSI (Microsoft
Installer) file for a simple
"hello world" application written in C#.
I am using NAnt Contrib. Getting
object reference error.
Code for the build script is as follows:
BUILD SCRIPT:
<target name="build" description="compiles
the source code">
<csc
target="exe" output="hello.exe" debug="none">
<sources>
<includes
name="C:\sushant\test_projects\hello_world\hello_world\class1.cs"
/>
</sources>
</csc>
</target>
=================================
Generating MSI file script:
<target name="build-msi2"
description="building msi file using msi task"
depends="build">
<loadtasks assembly="c:\Program
Files\Nant\NantContrib\bin\nantcontrib-0.85-rc3\bin\NAnt.Contrib.Tasks.dll"
/>
<msi
output="C:\sushant\test_projects\mymsi.msi"
sourcedir="C:\sushant\test_projects\hello_world\hello_world">
</msi>
</target>
==================================
The error msg I am getting is:
"Object reference not set to an instance of
an object."
==================================
Do I need any of the nested elements in
<msi> task as well? Or any pointers
on contrib documentation would also be
appreciated.
TIA,
Sush
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a
groundbreaking scripting language
that extends applications into web and mobile
media. Attend the live webcast
and join the prime developer group breaking into
this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
______________________________________________________________________
This email has been scanned by the MessageLabs
Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________
IMPORTANT
The information contained in this e-mail and any attachments is intended for
the addressee only
and may contain legally privileged or confidential information. If you are not
the intended
recipient you must not use, disclose, copy, distribute, alter, or take any
action in reliance
on the information and Avon Insurance plc will not accept liability for any
loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or
representation as to its
accuracy or reliability. If you are not the addressee, please notify us
immediately on 01789 202121*
and delete the material from your computer and destroy any copies.
Avon Insurance plc reserves the right to monitor and record incoming and
outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and
ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result
of any virus being passed on.
Avon Insurance plc (No. 209606).
Registered in England.
Registered Office: Arden Street,
Stratford upon Avon,
Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British
Insurers.
*For security and training purposes, telephone calls may be recorded and
monitored.