This page last changed on Nov 30, 2010 by ccnet-doc-gen.

Visual Studio Task

Most complex build processes use NAnt Task or MsBuild Task 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.

Version

Available from version 1.0

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

Element Description Type Required Default Version
buildTimeoutSeconds Number of seconds to wait before assuming that the process has hung and should be killed. Int32 No 600 (10 minutes) 1.0
buildtype The type of build. String - one of:
  • Rebuild
  • Build
  • Clean
No rebuild 1.0
configuration The solution configuration to use (not case sensitive). String Yes n/a 1.0
description Description used for the visualisation of the buildstage, if left empty the process name will be shown. String No The task/publisher name. 1.5
dynamicValues The dynamic values to use for the task. Dynamic Values array No None 1.5
environment A set of environment variables set for commands that are executed.
Each variable should be specified as
<variable name="name" value="value" />

.
Environment Variable array No    
executable The path to devenv.com. String No See below 1.0
priority The priority class of the spawned process. String - one of:
  • Normal
  • Idle
  • High
  • RealTime
  • BelowNormal
  • AboveNormal
No Normal 1.5
project A specific project in the solution, if you only want to build one project (not case sensitive). String No All projects 1.0
solutionfile The path of the solution file to build. If relative, it is relative to the Project Working Directory. String Yes n/a 1.0
version The version of Visual Studio. String - one of:
  • VS2002
  • VS2003
  • VS2005
  • VS2008
  • VS2010
  • 7.0
  • 7.1
  • 8.0
  • 9.0
  • 10.0
No See below 1.0

Notes

If executable and version are not specified, CC.NET will search the registry for VS.NET 2010, 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.

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.

Label Description Example Version
CCNetBuildCondition The condition used to trigger the build, indicating if the build was triggered by new modifications or if it was forced. Legal values are: "IfModificationExists" or "ForceBuild" ForceBuild  
CCNetIntegrationStatus The status of the current integration. Could be Success, Failure, Exception or Unknown Success  
CCNetLabel The label used to identify the CCNet build. This label is generated by the CCNet labeller. 1.0.2.120  
CCNetLastIntegrationStatus The status of the previous integration. Could be Success, Failure, Exception or Unknown Success  
CCNetProject The name of the CCNet project that is being integrated. MyProject  
CCNetBuildDate The date of the build (in yyyy-MM-dd format) 2005-08-10  
CCNetBuildTime The time of the start of the build (in HH:mm:ss format) 08:45:12  
CCNetArtifactDirectory The project artifact directory (as an absolute path) c:\program files\CruiseControl.NET\Server\MyProject\Artifacts  
CCNetWorkingDirectory The project working directory (as an absolute path) c:\program files\CruiseControl.NET\Server\MyProject\WorkingDirectory  
CCNetRequestSource The source of the integration request; this will generally be the name of the trigger that raised the request. IntervalTrigger 1.1.0
CCNetFailureUsers The list of users who have contributed modifications to a sequence of builds that has failed. John, Smith
 
CCNetListenerFile Viewing build progress with Nant and MSBuild c:\Project\Artifact\listener.xml 1.4.0
CCNetProjectUrl The URL where the project is located http://myhost/ccnet/server/  
CCNetNumericLabel Contains the label as an integer if conversion is possible, otherwise zero. 1  
CCNetModifyingUsers
The list of users who have contributed to the current build only
Smith  
CCNetUser The user who forced the build. If security is off, or the build is not forced, then this will not be set. John Doe 1.5.0
Automatically Generated

Documentation generated on Tuesday, 30 Nov 2010 at 10:25:51 AM
Using assembly version 1.6.7805.1

Document generated by Confluence on Jan 23, 2011 08:52