I have the following code to build a project from another C# app:
var buildEngine = new Engine();
buildEngine.RegisterLogger(new ConsoleLogger());
var success = buildEngine.BuildProjectFile(pathToCsProjFile);
if(!success)
{
Log.LogIt("On Noes! We Broke!");
}
else
{
Log.LogIt("It Worked!!!!!!");
}
Currently it builds the default configuration (Debug) but I want it to build the release version. If I were invoking MsBuild from the command line I would do something like:
C:\Windows\WinFX\v3.5>msbuild.exe *.proj /ToolsVersion:3.5 /p:Configuration=Release
How do I pass that configuration switch to the build engine?