views:

969

answers:

1

I have googled everywhere for this solution and cannot find anything!

I want to have a msbuild script to do the following:

  1. Build the project solution
  2. Publish the built solution with the specified app.config (app.config.debug or app.config.release) to a specified folder (Development or Production)
  3. With the specified configuration, know where to check for updates.
    -if deployment -> check in the sample production folder
    -if development -> check in the sample development folder

The script currently works but there are two problems...

  • I cannot figure out how to have two different installations that check two different places to check for updates.
  • I cannot auto increment the revision build. It currently stays at the same build number everytime i use the script.

My Current script:

msbuild "C:\sample\sample.csproj"
/t:clean
/t:build
/t:publish
/p:Configuration=release
/property:PublishDir="C:\Samplelocation/"
/property:UpdatedEnabled=true
/property:UpdateRequired=true
/property:UpdateUrl="C:\Samplelocation/"
/property:GenerateManifests=true
/property:PublishWizardCompleted=true

Any help would be greatly appreciated. Thanks ahead of time!

+3  A: 

You should take a look at MSBuild Batching.

Here are some links on batching:

Sayed Ibrahim Hashimi
Thank you, Sayed. While not the exact answer, the links provided look more than useful. :)