<solution>

Compiles VS.NET solutions (or sets of projects), automatically determining project dependencies from inter-project references.

This task support the following projects:

Note: Right now, only Microsoft Visual Studio .NET 2002 and 2003 solutions and projects are supported. Support for .NET Compact Framework projects is also not available at this time.

The <solution> 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).

Note: The <solution> task expects all project files to be valid XML files.

Resx Files

When building a project for a down-level target framework, special care should be given to resx files. Resx files (can) contain references to a specific version of CLR types, and as such are only upward compatible.

For example: if you want to be able to build a project both as a .NET 1.0 and .NET 1.1 assembly, the resx files should only contain references to .NET 1.0 CLR types. Failure to do this may result in a InvalidCastException failure at runtime on machines with only the .NET Framework 1.0 installed.

Parameters

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
platform string The name of platform to build the solution for. 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

Nested Elements:

<projects>

The projects to build.

</projects>

<referenceprojects>

The projects to scan, but not build.

</referenceprojects>

<webmap>

WebMap of URL's to project references.
<map>

Represents a single mapping from URL project path to physical project path.

Parameters

AttributeTypeDescriptionRequired
pathfile Specifies the actual path to the project file, or the path fragment to replace. True
urlstring Specifies the URL of the project file, or a URL fragment to match. True
casesensitivebool Specifies whether the mapping is case-sensitive or not. False
ifbool Indicates if the URL of the project file should be mapped. False
unlessbool Indicates if the URL of the project file should not be mapped. False
</map>

</webmap>

<excludeprojects>

Fileset of projects to exclude.

</excludeprojects>

<assemblyfolders>

Set of folders where references are searched when not found in path from project file (HintPath).

</assemblyfolders>

<property>

Set of properties set at solution level. Builders for projects in solution may or may not use them.

Sets a property in the current project.

Note: NAnt uses a number of predefined properties.

Parameters

AttributeTypeDescriptionRequired
namestring The name of the NAnt property to set. True
valuestring The value to assign to the NAnt property.

This attribute's properties will not be automatically expanded!

True
dynamicbool Specifies whether references to other properties should not be expanded when the value of the property is set, but expanded when the property is actually used. By default, properties will be expanded when set. False
overwritebool Specifies whether the value of a property should be overwritten if the property already exists (unless the property is read-only). The default is true. False
readonlybool Specifies whether the property is read-only or not. The default is false. False
failonerrorbool Determines if task failure stops the build, or is just reported. The default is true. False
ifbool If true then the task will be executed; otherwise, skipped. The default is true. False
unlessbool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbosebool Determines whether the task should report detailed build log messages. The default is false. False

Examples

</property>

Examples

Requirements

Assembly: NAnt.VSNetTasks (0.91.4312.0)