static ProjectPropertyGroupElement CreatePropertyGroupChoice(ProjectRootElement root,
string condition,
bool unsafeMode, string outputPath, bool optimize,
bool debugSymbol, string debugType, string constants
)
{
ProjectPropertyGroupElement group = root.AddPropertyGroup();
group.Condition = condition;
if (unsafeMode)
{
group.AddProperty("AllowUnsafeBlocks", "true");
}
group.AddProperty("ErrorReport", "prompt");
group.AddProperty("WarningLevel", "4");
group.AddProperty("OutputPath", outputPath); //,eg @"bin\Debug\"
group.AddProperty("Optimize", optimize ? "true" : "false");
group.AddProperty("DebugType", debugType);
if (debugSymbol)
{
group.AddProperty("DebugSymbols", "true");
}
group.AddProperty("DefineConstants", constants); //eg DEBUG; TRACE
return group;
}