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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:33:26+00:00 2026-06-17T12:33:26+00:00

We have a project where we customized the TFS build script in TFS 2008,

  • 0

We have a project where we customized the TFS build script in TFS 2008, back when the builds were MSBuild based, instead of Workflow files. This customized script uses the <Exec> task to call NAnt to do some packaging.

After migrating our TFS 2010 installation to a new server and upgrading to TFS 2012, that line in the TFSBuild.proj file is causing an error:

Target "AfterCompile: (TargetId:321)" in project "C:\Builds\2\Proj\Continuous Integration (Proj)\BuildType\TFSBuild.proj" (target "Compile" depends on it):
Using "Exec" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Exec" (TaskId:209)
  Task Parameter:Command=C:\Tools\NAnt\bin\Nant.exe (TaskId:209)
  Task Parameter:WorkingDirectory=..\Sources\ (TaskId:209)
  Command: (TaskId:209)
  C:\Tools\NAnt\bin\Nant.exe (TaskId:209)
C:\Builds\2\Proj\Continuous Integration (Proj)\BuildType\TFSBuild.proj(225,5): error MSB6003: The specified task executable "cmd.exe" could not be run. The directory name is invalid
Done executing task "Exec" -- FAILED. (TaskId:209)
Done building target "AfterCompile" in project "TFSBuild.proj" -- FAILED.: (TargetId:321)

That line looks like this:

<Target Name="AfterCompile">
  <Exec Command="C:\Tools\NAnt\bin\Nant.exe" WorkingDirectory="..\Sources\" />
  <!-- ... -->
</Target>
  • 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-06-17T12:33:27+00:00Added an answer on June 17, 2026 at 12:33 pm

    Check your working directory. I expect this to point to a non existing location.

    Specifically, the default Sources and Binaries directory names were changed in TFS 2012 to src and bin. Use the properties $(SourcesSubdirectory) and $(BinariesSubdirectory) to get the correct value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our project, we'd like to have our TFS build put each project into
In my magento project the search result not displays. I have customized my magento.
I have project asp.net with namespace test and I'm using resources (files Resource.resx and
folks! I have project in cc.net and this project nay start by 3 ways
I have the following problem. I am trying to customize default TFS build process
Right now I'm using Trac with multiple projects and have customized the project-listing template
I have a software project that at the last stage of its build, after
is it ok if i have this X project using .net2.0, and that X
Currently I have a post-build event configured in my web project using Visual Studio
I am deploying a SF2.1 project into production. I have customized the user model

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.