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

  • SEARCH
  • Home
  • 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 139713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:29:04+00:00 2026-05-11T07:29:04+00:00

I’m new to NAnt and have been able to create a <target> which 1)

  • 0

I’m new to NAnt and have been able to create a <target> which

1) Deletes any code from the current folder

2) Exports fresh code from SVN

3) Builds the code in the default directory which is the PrecompiledWeb folder (its a web app)

Here it is:

<target name='export' description='export code from svn'>     <delete dir='${Delete.Dir}'></delete>     <exec program='svn' commandline='export ${MySVN.Repos} ${MySVN.Dest}' />     <msbuild project='${Solution.Filename}'>         <property name='Configuration' value='Release'/>     </msbuild> </target> 

I want to specify a custom output directory (other than ‘PrecompiledWeb’). Is this possible and could you please show me the necessary tag/property?

Thank you!

EDIT

Thanks to Scott and Si, I’m getting closer to a solution, but I still don’t have anything that works. There comments led me to this article on MSBuild’s Output Path Property. Using their code:

<?xml version='1.0'?> <project name='test' default='build' basedir='.' xmlns='http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd'>     <target name='build'>         <exec program='${framework::get-framework-directory('net-3.5')}/msbuild.exe'>           <arg value='${Full.Path}\Code\MySolution.sln' />           <arg value='/p:OutputPath=${Full.Path}\Output\' />         </exec>     </target> </project> 

This will sucessfully run; however, in my solution which contains a web site and a class library, it publishes the class library dll to the specified output path, but it still publishes the actual web site to the default PrecompiledWeb folder.

Does anyone have any suggestions for how to change the PrecompiledWeb folder path from NAnt?

Thanks again to everyone who’s helped!

Edit 2 Final Solution

Here is what I finally was able to get working (updated for .net 4):

<exec program='${framework::get-framework-directory('net-4.0')}/msbuild.exe'>     <arg value='${Full.Path}\Code\MySolution.sln' />     <arg value='/t:Rebuild' />     <arg value='/t:ResolveReferences' />     <arg value='/t:_CopyWebApplication' />     <arg value='/p:OutDir=${Build.Output}bin\' />     <arg value='/p:WebProjectOutputDir=${Build.Output}' />     <arg value='/p:Configuration=Release' /> </exec> 
  • 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. 2026-05-11T07:29:05+00:00Added an answer on May 11, 2026 at 7:29 am

    One can specify and override some of properties for msbuild. In order to specify the output directory, override the OutputDir property.

    <target name='export' description='export code from svn'>         <delete dir='${Delete.Dir}' />         <exec program='svn' commandline='export ${MySVN.Repos} ${MySVN.Dest}' />         <msbuild project='${Solution.Filename}'>             <property name='Configuration' value='Release'/>             <property name='OutputDir' value='${Output.Dir}'/>         </msbuild> </target> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have been unable to fix a problem with Java Unicode and encoding. The
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.