In this article I will show you how to create your Visual Studio application build with Automator. Whether it will be a nightly build or release, doesn't matter really. As an example for this, we will examine a Workflow that I use to build Automator itself.

Note: building of Automator contains some steps that you probably won't need (in case your software doesn't contain addins), but we'll look into them anyway. Also, you should carefully check paths, I have not yet implemented variables in Automator, so paths should be hardcoded explicitly. Also, I don't want to mention it every time, every added Task is a dependency of previous.

Let's begin.

Step 1: Locate the latest MSBuild.exe on your computer. Usually it is placed at C:\WINDOWS\Microsoft.NET\Framework\<version>\MSBuild.exe.
Step 2: Create a CallTask in Automator that will call this MSBuild with some arguments. In my case it looks like this:


Briefly about command line arguments, for further reference see
  • A path to the Visual Studio solution
  • /t:Build - a target, what we want to do (build our solution)
  • /p:Configuration=Release;OutputPath=D:\BuildTest - specifies build configuration and output path, overriding solution settings
Don't forget to check "Pause workflow while executing", otherwise the execution will continue before you application has finished building.

Step 3: (Optional) Add a ScriptTask that will create an Addins directory in the output folder if it doesn't exist:


Step 4: (Optional) Add a ScriptTask that will deploy addin assembly into the previously created or existing Addins folder:


Step 5: Now, when we have our application builded and structured, we need to pack it somehow. WinRAR should do the trick, so add a CallTask that will execute it:


Briefly about arguments, for further reference see WinRAR help
  • a - means that we want to add files to an archive
  • -m5 - compression rate, 5 means maximum compression
  • -y - answers 'yes' to all questions that can be asked during the work, mostly about overwriting files
  • -ag_dd-mm-yyyy - adds current date to archive name in specified format (will be something like Automator_30-05-2011.rar)
  • path and name of the resulting archive
  • all paths that should be included

So, that's all. Run the Workflow and you'll see that a build of your app can be created in seconds, even without launching Visual Studio or another tools, except Automator. The Workflow xml file can be downloaded here: AutomatorBuildWorkflow.xml

Last edited May 30, 2011 at 8:29 AM by VictorLapin, version 8


No comments yet.