private void AddOutputPath(Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig, string configName) { //add the output path string outputBasePath = this.ProjectMgr.OutputBaseRelativePath; if (outputBasePath.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) outputBasePath = Path.GetDirectoryName(outputBasePath); newConfig.AddProperty("OutputPath", Path.Combine(outputBasePath, configName) + Path.DirectorySeparatorChar.ToString()); }
private void PopulateEmptyConfig(ref Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig) { newConfig = this.project.BuildProject.Xml.AddPropertyGroup(); // Get the list of property name, condition value from the config provider IList<KeyValuePair<KeyValuePair<string, string>, string>> propVals = this.NewConfigProperties; foreach (KeyValuePair<KeyValuePair<string, string>, string> data in propVals) { KeyValuePair<string, string> propData = data.Key; string value = data.Value; Microsoft.Build.Construction.ProjectPropertyElement newProperty = newConfig.AddProperty(propData.Key, value); if (!String.IsNullOrEmpty(propData.Value)) newProperty.Condition = propData.Value; } }