Created
March 19, 2013 02:00
-
-
Save dougrathbone/5193097 to your computer and use it in GitHub Desktop.
MsBuild through the c# api
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
var pc = new ProjectCollection(); | |
var buildProperties = new Dictionary<string, string> | |
{ | |
{"Configuration", "Release"}, | |
{"Platform", "Any CPU"}, | |
{"OutputPath", _outputPath}, | |
{"EnableNuGetPackageRestore", "true"} | |
}; | |
var buildParameters = new BuildParameters(pc); | |
buildParameters.Loggers = new List<ILogger>{ new CustomMSBuildLogger(_inputPath)}; | |
var buildRequest = new BuildRequestData("myProject.csproj", buildProperties, null, new[] { "Clean", "Rebuild" }, null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment