Created
August 8, 2017 17:38
-
-
Save Insire/87f7f581c2ce4aed9eb6a77cf5280ded to your computer and use it in GitHub Desktop.
how to get the project output directories from a solution with cake
This file contains hidden or 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.Incubator | |
| var target = Argument("target", "Default"); | |
| var solutionPath ="./WpfApp2.sln"; | |
| Task("Information") | |
| .Does(()=> | |
| { | |
| Information("Parsing {0}",solutionPath); | |
| var solution = ParseSolution(solutionPath); | |
| foreach(var project in solution.Projects) | |
| { | |
| var customProject = ParseProject(project.Path, configuration: "Release", platform: "anyCPU"); | |
| Information(@"Name: {0} | |
| Path: {1} | |
| Id: {2} | |
| Type: {3} | |
| OutputPath: {4}", | |
| project.Name, | |
| project.Path.FullPath, | |
| project.Id, | |
| project.Type, | |
| customProject.OutputPath | |
| ); | |
| } | |
| }); | |
| Task("Default").IsDependentOn("Information"); | |
| RunTarget(target); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment