Summary
Lists all projects in a solution file.
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Sln")]
[CakeNamespaceImport("Cake.Common.Tools.DotNet.Sln.List")]
public static IEnumerable<string> DotNetSlnList(this ICakeContext context, FilePath solution, DotNetSlnListSettings settings)
Examples
var settings = new DotNetSlnListSettings
{
Verbosity = DotNetVerbosity.Diagnostic
};
var projects = DotNetSlnList("./app/app.sln");
foreach (var project in projects)
{
Information(project);
}
Attributes
Type |
Description |
CakeMethodAliasAttribute |
An attribute used to mark script method aliases.
|
CakeAliasCategoryAttribute |
An attribute used for documentation of alias methods/properties.
|
CakeNamespaceImportAttribute |
An attribute used to hint Cake about additional namespaces that need
to be imported for an alias to work. This attribute can mark an
extension method, the extension method class, or the assembly to provide a global set of imports.
|
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The context. |
solution |
FilePath |
The solution file to use. If this argument is omitted, the command searches the current directory for one. If it finds no solution file or multiple solution files, the command fails. |
settings |
DotNetSlnListSettings |
The settings. |
Return Value
Type |
Description |
IEnumerable<string> |
The list of projects. |