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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:16:10+00:00 2026-05-13T12:16:10+00:00

I have a nightly script that should build Debug and Release zip files then

  • 0

I have a nightly script that should build Debug and Release zip files then upload these via ftp to the client.

Ive always used AfterDropBuild for deployment of a single configuration – which works fine – but building both config’s in a single build doesn’t seem to work. I was hoping that AfterDropBuild would execute twice. I can of course code the tasks in AfterDropBuild to handle both configs but this doesnt feel right.

Is there a better way?

<Target Name="AfterDropBuild">
    <CreateProperty Value="$(DropLocation)\ToClient">
      <Output PropertyName="DeploymentFolder" TaskParameter="Value" />
    </CreateProperty>
    <GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)">
      <Output TaskParameter="BuildNumber" PropertyName="BuildNumber"></Output>
    </GetBuildProperties>
    <CreateProperty Value="%(ConfigurationToBuild.FlavorToBuild)">
      <Output PropertyName="ConfigFlavor" TaskParameter="Value" />
    </CreateProperty>

    <MakeDir Directories="$(DeploymentFolder)" />

    <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
               BuildUri="$(BuildUri)" Name="ZipSite"
               Message="Zipping Site">
      <Output TaskParameter="Id" PropertyName="ZipStepID" />
    </BuildStep>
    <!-- get a list of all the files in the published web sites -->
    <CreateItem Include="$(OutDir)_PublishedWebSites\Site.Web\**\*.*"  >
      <Output TaskParameter="Include" ItemName="FilesToZip"/>
    </CreateItem>
    <CreateItem Include="$(OutDir)\Site.msi" >
      <Output TaskParameter="Include" ItemName="FilesToZip"/>
    </CreateItem>

    <!-- zip the deployment files -->
    <Zip Files="@(FilesToZip)"
         ZipFileName="$(DeploymentFolder)\Site_$(BuildNumber)_$(ConfigFlavor).zip"
         WorkingDirectory="$(OutDir)_PublishedWebSites\Site.Web" />

    <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
               BuildUri="$(BuildUri)" Id="$(ZipStepId)" Status="Succeeded" />

    <!-- upload the zip -->
    <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
               BuildUri="$(BuildUri)" Name="UploadZip"
               Message="Uploading Zip to Client">
      <Output TaskParameter="Id" PropertyName="ZipUploadID" />
    </BuildStep>

    <CreateItem Include="$(DeploymentFolder)\*.zip" >
      <Output TaskParameter="Include" ItemName="FilesToUpload" />
    </CreateItem>

    <FtpUpload
      RemoteUri="ftp://ftp.blahblah.com/"
      LocalFiles="@(FilesToUpload)"
      RemoteFiles="@(FilesToUpload->'%(RecursiveDir)%(Filename)%(Extension)')"
      UserName="user"
      Password="password"
      />
    <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
           BuildUri="$(BuildUri)" Id="$(ZipUploadID)" Status="Succeeded" />
  </Target>

Thanks

  • 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-13T12:16:10+00:00Added an answer on May 13, 2026 at 12:16 pm

    You can add as many configurations as you like to the SolutionsToBuild (e.g. we build several separate library solutions and then two different applications that are built from the same source code (one solution) but built from two configurations using a #define to alter the output code)

    You only get called once when the build completes, but that handler can then run as many processes/steps as needed to deploy the results (in our case, we build the two compiled applications plus a load of resource files into 10 different customer-specific installers, so there are 10 “steps” to our post-build, each producing another final output).

    You can place the commands to build each of these final results into its own target so it’s really easy to include/exclude different results from the build if you need to chop and change things regularly – but chances are that once it’s set up you won’t need to change it often anyway. Then the only “special case” code that has to know about the fact that all these variants are built wil be the post-build target, which will simply depend on any targets you need. So it ends up quite tidy.

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

Sidebar

Ask A Question

Stats

  • Questions 457k
  • Answers 458k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer JMeter is not a browser, and does not interpret the… May 15, 2026 at 10:58 pm
  • Editorial Team
    Editorial Team added an answer time.sleep(seconds) import time print 1 time.sleep(1) print 2 time.sleep(0.45) print… May 15, 2026 at 10:57 pm
  • Editorial Team
    Editorial Team added an answer If you do use a system.timers.timer make sure to set… May 15, 2026 at 10:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.