Compiles VS.NET solutions (or sets of projects), automatically determining project dependencies from inter-project references.
For a list of all members of this type, see SolutionTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.VSNet.Tasks.SolutionTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
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 SolutionTask 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 SolutionTask 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 SolutionTask expects all project files to be valid XML 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.
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" />
Namespace: NAnt.VSNet.Tasks
Assembly: NAnt.VSNetTasks (in NAnt.VSNetTasks.dll)
SolutionTask Members | NAnt.VSNet.Tasks Namespace