This page last changed on Mar 14, 2009 by dcameron.

Most complex build processes use NAnt or MSBuild to script the build. However, for simple projects that just need to build a Visual Studio.NET solution, the Visual Studio task <devenv> provides an easier method.

Examples

Minimalist example:

<devenv>
    <solutionfile>src\MyProject.sln</solutionfile>
    <configuration>Debug</configuration>
</devenv>

Full example:

<devenv>
    <solutionfile>src\MyProject.sln</solutionfile>
    <configuration>Debug</configuration>
    <buildtype>Build</buildtype>
    <project>MyProject</project>
    <executable>c:\program files\Microsoft Visual Studio .NET\Common7\IDE\devenv.com</executable>
    <buildTimeoutSeconds>600</buildTimeoutSeconds>
    <version>VS2002</version>
</devenv>

Configuration Elements:

Node Description Type Required Default
solutionfile The path of the solution file to build. If relative, it is relative to the Project Working Directory. string true n/a
configuration The solution configuration to use (not case sensitive). string true n/a
buildtype The type of build. Valid values are Rebuild, Build or Clean (not case sensitive). string false rebuild
project A specific project in the solution, if you only want to build one project (not case sensitive). string false The default is to build all projects selected by the configuration.
executable The path to devenv.com. string false (see below)
buildTimeoutSeconds Number of seconds to wait before assuming that the process has hung and should be killed. int false 600 (10 minutes)
version The version of Visual Studio. One of VS2002, VS2003, VS2005, VS2008, 7.0, 7.1, 8.0, or 9.0 false (see below)
description If filled in, this will be shown in the buildstage as the process name
string
false
n/a

If executable and version are not specified, CC.NET will search the registry for VS.NET 2008, 2005, 2003, and 2002 in that order. If you need to use a specific version when a newer version is installed, you should specify the version property to identify it, or specify the executable property to point to the location of correct version of devenv.com.

Note: this task requires you to have Visual Studio .NET installed on your integration server.

Often programmers like to use a centralised project to build an entire software system. They define specific dependencies and the build order on that specific project to reproduce the behaviours of an nmake build.
Document generated by Confluence on Mar 14, 2009 02:55