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 6590595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:19:11+00:00 2026-05-25T17:19:11+00:00

I am refactoring my existing NAnt build scripts to be able to use them

  • 0

I am refactoring my existing NAnt build scripts to be able to use them on just about any project and have the proper values sent over from CruiseControl .NET. I’ve come across an issue, though, where the Target isn’t being set correctly.

I have defined my call to NAnt as follows:

  <tasks>
    <nant>
      <executable>$(NAntExecutablePath)</executable>
      <buildFile>D:\ci\default.build.xml</buildFile>
      <!--baseDirectory></baseDirectory-->
      <buildArgs>
        -D:SolutionFile="$(Batch_WorkingFolderTrunk)\MySolution.sln"
        -D:LocalDeployRoot=D:\ci\deploy\MyProject
      </buildArgs>
      <targetList>
        <target>build</target>
      </targetList>
    </nant>
  </tasks>

and my build file has the required required tasks

  <target name="clean">
    <exec program="${MSBuildPath}">
      <arg line='"${SolutionFile}"' />
      <arg line="/property:Configuration=${SolutionConfiguration}" />
      <arg value="/target:Clean" />
      <arg value="/verbosity:normal" />
      <arg value="/nologo" />
      <arg line='/logger:"${CcnetMsbuildLoggerPath}"' if="${file::exists('${CcnetMsbuildLoggerPath}')}"/>
    </exec>

    <delete>
      <fileset basedir=".">
        <include name="bin\**\*" />
        <include name="TestResults\**\*" />
      </fileset>
    </delete>
  </target>

      <target name="build" depends="clean">

        <delete>
          <fileset basedir="${LocalDeployRoot}">
            <include name="**\*"/>
          </fileset>
        </delete>

        <exec program="${MSBuildPath}">
          <arg line='"${SolutionFile}"' />
          <!--arg line='/property:Configuration="${SolutionConfiguration}"' /-->
          <arg line='/property:OutputPath="${LocalDeployRoot}"' />
          <!--arg line='/property:Platform="${SolutionPlatform}"' /-->
          <arg value="/target:Rebuild" />
          <arg value="/verbosity:normal" />
          <arg value="/nologo" />
          <arg line='/logger:"${CcnetMsbuildLoggerPath}"' if="${file::exists('${CcnetMsbuildLoggerPath}')}"/>
        </exec>
      </target>

My error message states

Target framework: Microsoft .NET Framework 4.0 Target(s) specified:
build

 [echo] Starting the build script

BUILD FAILED

Target ‘ ‘ does not exist in this project.

Total time: 0.1 seconds.

Any ideas out there?

I can run the NAnt script successfully via the command line:

D:\ci>nant-0.91\bin\nant.exe /f:default.build.xml build -D:SolutionFile=”D:\ci\code\MyProject\MySolution.sln” -D:LocalDeployRoot=D:\ci\deploy\MyProject

  • 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-25T17:19:12+00:00Added an answer on May 25, 2026 at 5:19 pm

    This appears to be a bug introduced some time after v1.4.4.83. The solution was to change the node to be a single line. In my version 1.4.4.83 configuration, I have the buildArgs options on separate lines for increased readability.

    My solution was to change

    <buildArgs>
      -D:SolutionFile="$(Batch_WorkingFolderTrunk)\MySolution.sln"
      -D:LocalDeployRoot=D:\ci\deploy\MyProject
    </buildArgs>
    

    to

    <buildArgs>-D:SolutionFile="$(Batch_WorkingFolderTrunk)\MySolution.sln" -D:LocalDeployRoot=D:\ci\deploy\MyProject</buildArgs>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am refactoring an existing VB.NET application to use Linq. I've been able to
Having just read the first four chapters of Refactoring: Improving the Design of Existing
I have an existing WCF RIA project built on the Release Candidate; I'm now
I have this general problem in design, refactoring or triage: I have an existing
I have a problem with some simple code, I'm refactoring some existing code from
We're going global. I've been tasked with refactoring our existing products to support localization.
I'm making a study on refactoring limitations on improving existing software architecture and I
While refactoring some old code I have stripped out a number of public methods
I am currently refactoring an existing codebase (EJBs) to rip out all blocks where
I'm refactoring an existing state machine that heavily used case statements and emums. I've

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.