www.buildautomator.com  Build Automator Documentation

Call MS Build

Previous  Top  Next  


MS-Build is a command line compiler that is used by many programming languages to compile projects and solutions in various programming languages.  The Build Automator™ includes an action that can call the selected MS-Build version to compile your project or solution.  Note that the Build Automator™ does NOT build your solution or project files for you, it simply takes your existing solution or project and MS-Build then compiles it using the related compiler.  The Build Automator™ can work with any MS-Build Solution files (.sln files) and several project files, such as C#, Visual Basic, Visual C++, Delphi and Clarion.

 

Call_MSBuild_NET_selects

 

Properties

Explanation

Use .NET to locate...

If checked, you can select what version of the .NET framework is installed and the Build Automator™ will use that selection to locate MS-Build

Select .NET version...

Select the appropriate version from the dropdown

MS-Build location  ROMx116_dblisttable

Option for you to manually select the MS-Build that you want to use.  Use the button on the right of the entry to select the MS-Build.

Project Type

Select the MS-Build project type that you want to use.  This is used when you select the solution or project to specify the correct file extension.

Build Project File  ROMx116_dblisttable

This is the path and name of the solution or project file that you want to compile.  Use the button on the right to select the MS-Build

Additional Parameters  ROMx116_dblisttable

Enter any parameters that you may want to use.  Please refer to the MS-Build command line parameters information on MSDN for more information.

MS-Build comes in several different versions and the parameters vary based on what version you are using.  You can locate the MS-Build executable on your computer in two slightly different ways.

 

First is by either selecting a version of .NET and the Build Automator™ will locate the MS-Build based on the .NET version.  To use this option check the "Use .NET to locate MS Build" and then select the appropriate .NET version.  

 

The second option is for you to select the MSBuild.exe manually.  To use this option uncheck the "Use .NET to locate MS Build" and the MSBuild location entry and button will now be enabled.  Click on the button to select the appropriate version of MS Build.  By default it will go to the latest version of .NET that you have installed as a start folder for you to look for the MSBuild.exe.

 

 

Call_MSBuild_User_selects

 

Once you have selected the appropriate way to locate the MS-Build executable, you can now select the MS Build project type that you want to compile.  The options you have are MSBuild Solution (*.sln), Clarion 7 (*.cwproj), Delphi (*.dproj), Visual Basic (*.vbproj), Visual C# (*.csproj) and Visual C++ (*.vcproj).  Select the appropriate project type from the drop down.

Call_MSBuild_Project_types

 

Once you have selected the type, click on the button on the right of the entry for the "Build Project File"  This will open a "Select File" dialog for you to pick the correct file to compile.

 

Call_MSBuild_Select_File

 

Finally there is a big box for you to enter any additional parameters that you may want.  For a simple rebuild to a Release you would need something like:

 

/t:rebuild /p:Configuration=Release

 

This will rebuild the target in Release mode.  For more information on MS-Build parameters, please check out the online MS Build command line reference.  To get more information about the parameters for your particular version, use:  

 

MSBuild.exe /help

 

That will give you a list of the available parameters for your particular version. 

 

Additional web resources for MS-Build:

http://msdn2.microsoft.com/en-us/library/0k6kkbsd.aspx

http://www.codeproject.com/KB/books/msbuild.aspx

http://blogs.msdn.com/msbuild/

MSDN TV video on MS-Build

 



Direct link to this page: http://www.buildautomator.com/onlinemanual/call_msbuild.htm