NAnt
![]() ![]() ![]() |
v0.85 |
[This is preliminary documentation and subject to change.]
Compiles VS.NET solutions (or sets of projects), automatically determining project dependencies from inter-project references.
This task will analyze each of the given .csproj or .vbproj files and build them in the proper order. It supports reading solution files, as well as enterprise template projects.
This task also supports the model of referencing projects by their output filenames, rather than referencing them inside the solution. It will automatically detect the existance of a file reference and convert it to a project reference. For example, if project A references the file in the release output directory of project B, the solution task will automatically convert this to a project dependency on project B and will reference the appropriate configuration output directory at the final build time (ie: reference the debug version of B if the solution is built as debug).
Attribute | Type | Description | Required |
---|---|---|---|
configuration | string | The name of the solution configuration to build. | True |
enablewebdav | bool | Allow the task to use WebDAV for retrieving/compiling the projects within solution. Use of WebMap is preferred over WebDAV. The default is false. | False |
includevsfolders | bool | Includes Visual Studio search folders in reference search path. The default is true. | False |
outputdir | directory | The directory where compiled targets will be placed. This overrides path settings contained in the solution/project. | False |
solutionfile | file | The name of the VS.NET solution file to build. | False |
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False |
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
unless | bool | Opposite of if . If false then the task will be executed; otherwise, skipped. The default is false. |
False |
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |
Contains a strongly typed collection of WebMap objects.
Compiles all of the projects in test.sln
, in release mode, in the proper order.
<solution configuration="release" solutionfile="test.sln" />
Compiles all of the projects in projects.txt
, in the proper order.
<solution configuration="release"> <projects> <includesfile name="projects.txt" /> </projects> </solution>
Compiles projects A, B and C, using the output of project X as a reference.
<solution configuration="release"> <projects> <include name="A\A.csproj" /> <include name="B\b.vbproj" /> <include name="C\c.csproj" /> </projects> <referenceprojects> <include name="X\x.csproj" /> </referenceprojects> </solution>
Compiles all of the projects in the solution except for project A.
<solution solutionfile="test.sln" configuration="release"> <excludeprojects> <include name="A\A.csproj" /> </excludeprojects> </solution>
Compiles all of the projects in the solution mapping the specific project at http://localhost/A/A.csproj to c:\inetpub\wwwroot\A\A.csproj and any URLs under http://localhost/B/[remainder] to c:\other\B\[remainder]. This allows the build to work without WebDAV.
<solution solutionfile="test.sln" configuration="release"> <webmap> <map url="http://localhost/A/A.csproj" path="c:\inetpub\wwwroot\A\A.csproj" /> <map url="http://localhost/B" path="c:\other\B" /> </webmap> </solution>
Compiles all of the projects in the solution placing compiled outputs in c:\temp
.
<solution solutionfile="test.sln" configuration="release" outputdir="c:\temp" />