Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 882323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:24:32+00:00 2026-05-15T12:24:32+00:00

I am trying to create an installer for my project using NAnt. this is

  • 0

I am trying to create an installer for my project using NAnt.
this is how my build script looks like

<?xml version="1.0"?>
<project name="pleats" default="build-release" xmlns="http://nant.sf.net/release/0.85/nant.xsd">

<target name="build-release" depends="clean, make-builddir, build, release-properties, copy-to-release, build-installer" />
<property name="tools.dir" value="${path::get-full-path('tools')}" />  
<property name="src.dir" value="${path::get-full-path('src')}" />  
<property name="build.dir" value="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\WpfApplicationNAntTest\bin\Debug" />  
<target name="clean" description="Delete automated build artifacts">  
    <delete dir="${build.dir}" if="${directory::exists(build.dir)}" failonerror="false"/>  
</target>   
<target name="make-builddir" description="Create build dir and build report dir">       
    <mkdir dir="${build.dir}" unless="${directory::exists(build.dir)}" />  
</target>   
<target name="release-properties">      
    <property name="release.dir" value="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\WpfApplicationNAntTest\bin\Release"/>  
    <property name="wix.dir" value="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\Lib\wix"/>  
</target>   
<target name="copy-to-release">     
    <mkdir dir="${release.dir}" failonerror="false"/>  
    <copy todir="${release.dir}">           
        <fileset basedir="${src.dir}">              
            <include name="*" />  
        </fileset>          
    </copy>     
</target>
<target name="build">
    <loadtasks assembly="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\Lib\nantcontrib-0.85\bin\NAnt.Contrib.Tasks.dll"/>
    <msbuild project="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\WpfApplicationNAntTest.sln">
        <property name="configuration" value="debug" />
        <property name="Platform" value="any cpu" />    
    </msbuild>
</target>
<target name="build-installer">     
    <!-- for wix preprocessor so that the location of pleats files are propagated into the wxs -->  
    <setenv name="pleats.dir" value="${release.dir}"/> 
    <delete>            
        <fileset>           
            <include name="${wix.dir}/*.wixobj"/>
    </fileset>          
    </delete>       
    <exec program="${wix.dir}\candle.exe" workingdir=".\wix" commandline="SampleFirst.wxs " /> 
    <exec program="${wix.dir}\light.exe" workingdir=".\wix" commandline="-ext WixUIExtension -cultures:en-us SampleFirst.wixobj -out ${release.dir}\pleats.msi"/> 
</target>   
</project>

I am using the sample wxs file i got in wix tutorial.

 <?xml version='1.0' encoding='windows-1252'?>
 <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
   <Product Name='Foobar 1.0' Id='C2B662FC-82AA-11DF-93D4-6B70DFD72085' UpgradeCode='CE3E5F1C-82AA-11DF-A42F-7170DFD72085'
Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'>
<Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer"
  Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.'
  InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />

<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />

<Directory Id='TARGETDIR' Name='SourceDir'>
  <Directory Id='ProgramFilesFolder' Name='PFiles'>
    <Directory Id='Acme' Name='Acme'>
      <Directory Id='INSTALLDIR' Name='Foobar 1.0'>

        <Component Id='MainExecutable' Guid='DD4C895C-82AA-11DF-941D-8370DFD72085'>
          <File Id='FoobarEXE' Name='WpfApplicationNAntTest.exe' DiskId='1' Source='D:\Subrat\Projects\WPF\WpfApplicationNAntTest\WpfApplicationNAntTest\bin\Debug\WpfApplicationNAntTest.exe' KeyPath='yes'>
            <Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir" Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="WpfApplicationNAntTest.exe" IconIndex="0" Advertise="yes" />
            <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="WpfApplicationNAntTest.exe" IconIndex="0" Advertise="yes" />
          </File>
        </Component>

        <!--<Component Id='HelperLibrary' Guid='YOURGUID-6BE3-460D-A14F-75658D16550B'>
          <File Id='HelperDLL' Name='Helper.dll' DiskId='1' Source='Helper.dll' KeyPath='yes' />
        </Component>

        <Component Id='Manual' Guid='YOURGUID-574D-4A9A-A266-5B5EC2C022A4'>
          <File Id='Manual' Name='Manual.pdf' DiskId='1' Source='Manual.pdf' KeyPath='yes'>
            <Shortcut Id="startmenuManual" Directory="ProgramMenuDir" Name="Instruction Manual" Advertise="yes" />
          </File>
        </Component>-->

      </Directory>
    </Directory>
  </Directory>

  <Directory Id="ProgramMenuFolder" Name="Programs">
    <Directory Id="ProgramMenuDir" Name="Foobar 1.0">
      <Component Id="ProgramMenuDir" Guid="E510F3DA-82AA-11DF-8814-8970DFD72085">
        <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
        <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
      </Component>
    </Directory>
  </Directory>

  <Directory Id="DesktopFolder" Name="Desktop" />
</Directory>

<Feature Id='Complete' Level='1'>
  <ComponentRef Id='MainExecutable' />
  <!--<ComponentRef Id='HelperLibrary' />
  <ComponentRef Id='Manual' />-->
  <ComponentRef Id='ProgramMenuDir' />
</Feature>

<Icon Id="WpfApplicationNAntTest.exe" SourceFile="WpfApplicationNAntTest.exe" />
<UIRef Id="WixUI_Minimal" />
 </Product>
 </Wix>

when i am trying to make an installer i am geting this error –

the system cannot find the file WpfApplicationNAntTest.exe

i dont have much idea about Nant or wix as i am new to this. Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:24:33+00:00Added an answer on May 15, 2026 at 12:24 pm

    I think you need to specify the full path in the Icon element, SourceFile attribute to where the WpfApplicationNantTest.exe is.

    Something like:

    <Icon 
     Id="WpfApplicationNAntTest.exe"      
     SourceFile="D:\Subrat\Projects\WPF\WpfApplicationNAntTest\bin\debug\WpfApplicationNAntTest.exe" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a sitemap using Linq to Xml, but am getting an
I was trying to create a setup project using VS2008. Is there anyway to
I'm trying to create a very basic Setup and Deployment project using Visual Studio.
Trying to create several layers of folders at once C:\pie\applepie\recipies\ without using several different
I am trying to write an Setup Project/Installer for a class library driver that
I am using the Visual Studio 2008 Installer. I am trying to set a
I'm trying to create an ASP.NET Web Application, but this is all I see:
Here's my situation: I'm trying to create a SSL certificate that will be installed
I am trying create a WCF service that leverages the WPF MediaPlayer on the
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.