Last active
October 27, 2019 12:51
-
-
Save Xeinaemm/3bda8e7f4255ae6b69e7636670723f17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "Cake.FileHelpers&version=3.2.0" | |
void Build(string root = "") | |
{ | |
var solution = Argument<string>("Solution", "") != "" ? | |
new FilePath($"{root}{Argument<string>("Solution")}/{Argument<string>("Solution")}.sln") : | |
new FilePath(root + "BuildSolution.sln"); | |
MSBuild(solution, settings => settings | |
.SetConfiguration(Argument<string>("Configuration", "Debug")) | |
.UseToolVersion(MSBuildToolVersion.VS2019) | |
.SetNoLogo(true) | |
.SetVerbosity(Verbosity.Quiet) | |
.WithConsoleLoggerParameter("ErrorsOnly") | |
.SetMaxCpuCount(0) | |
.SetNodeReuse(true) | |
.WithProperty("BuildInParallel", "true") | |
.WithProperty("CreateHardLinksForCopyFilesToOutputDirectoryIfPossible", "true") | |
.WithProperty("CreateHardLinksForCopyAdditionalFilesIfPossible", "true") | |
.WithProperty("CreateHardLinksForCopyLocalIfPossible", "true") | |
.WithProperty("CreateHardLinksForPublishFilesIfPossible", "true")); | |
} | |
Task("Build").Does(() => Build()); | |
RunTarget(Argument<string>("Target", "")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment