Summary
Builds the specified solution or MsBuild project file using MSBuild.
Syntax
[CakeMethodAlias]
public static void MSBuild(this ICakeContext context, FilePath solution, MSBuildSettings settings, Action<IEnumerable<string>> standardOutputAction)
Examples
var outputBuilder = new StringBuilder();
MSBuild("./src/Cake.sln", new MSBuildSettings {
Verbosity = Verbosity.Minimal,
ToolVersion = MSBuildToolVersion.VS2015,
Configuration = "Release",
PlatformTarget = PlatformTarget.MSIL
},
output => foreach (var line in output) outputBuilder.AppendLine(line));
Attributes
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The context. |
solution |
FilePath |
The solution to build. |
settings |
MSBuildSettings |
The settings. |
standardOutputAction |
Action<IEnumerable<string>> |
The action to invoke with the standard output. |
Return Value