public bool BuildProjectFile(string projectFileName,
string[] targetNames,
IDictionary globalProperties,
IDictionary targetOutputs, string toolsVersion)
{
if (String.IsNullOrEmpty(projectFileName))
{
project.ToolsVersion = toolsVersion;
return(engine.BuildProject(project, targetNames, targetOutputs,
BuildSettings.DoNotResetPreviouslyBuiltTargets));
}
else
{
BuildPropertyGroup bpg = new BuildPropertyGroup();
if (globalProperties != null)
{
foreach (DictionaryEntry de in globalProperties)
{
bpg.AddProperty(new BuildProperty(
(string)de.Key, (string)de.Value,
PropertyType.Global));
}
}
return(engine.BuildProjectFile(projectFileName,
targetNames, bpg, targetOutputs, BuildSettings.DoNotResetPreviouslyBuiltTargets, toolsVersion));
}
}