【发布时间】:2015-05-18 10:02:45
【问题描述】:
我可以使用以下内容构建项目
static bool Build()
{
var projectCollection = ProjectCollection.GlobalProjectCollection;
var project = projectCollection.LoadProject(websiteProject);
var fileLogger = new FileLogger();
fileLogger.Parameters = @"logfile=" + @"app_data\log.txt";
projectCollection.RegisterLogger(fileLogger);
bool result = project.Build();
projectCollection.UnregisterAllLoggers();
return result;
}
但我需要能够将构建配置设置为发布。我看过documentation,但要么我错过了它,要么没有简单的方法来设置它。
【问题讨论】: