SolutionAliases.

ParseSolution(ICakeContext, FilePath) Method

Summary

Parses project information from a solution file.
Namespace
Cake.Common.Solution
Containing Type
SolutionAliases

Syntax

[CakeMethodAlias]
public static SolutionParserResult ParseSolution(this ICakeContext context, FilePath solutionPath)

Examples

var solutionPath = "./src/Cake.sln";
Information("Parsing {0}", solutionPath);
var parsedSolution = ParseSolution(solutionPath);
foreach(var project in parsedSolution.Projects)
{
    Information(
        @"Solution project file:
    Name: {0}
    Path: {1}
    Id  : {2}
    Type: {3}",
        project.Name,
        project.Path,
        project.Id,
        project.Type
    );
}

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.

Parameters

Name Type Description
context ICakeContext The context.
solutionPath FilePath The solution path.

Return Value

Type Description
SolutionParserResult A parsed solution.