public override bool Save() { MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(Project, Helper.Configuration, Helper.Platform); string controlValue = getControlValue(control); group.SetElementMetadata(elementName, metadataName, controlValue); return(true); }
/// <summary> /// Applies the OutputType property value from combo box control to the vcxproj project. /// <para>The OutputType property is translated to ConfigurationType and Subsystem properties</para> /// </summary> /// <returns>the ConfigurationType associated to OutputType</returns> string ConvertOutputType() { OutputType[] values = (OutputType[])Enum.GetValues(typeof(OutputType)); OutputType outputType = values[this.outputTypeComboBox.SelectedIndex]; string subsystem = OutputTypeToSubsystem(outputType); MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(base.Project, base.Project.ActiveConfiguration); group.SetElementMetadata("Link", "SubSystem", subsystem); return(OutputTypeToConfigurationType(outputType)); }
/// <summary> /// Applies the OutputType property value from combo box control to the vcxproj project. /// <para>The OutputType property is translated to ConfigurationType and Subsystem properties</para> /// </summary> /// <returns>the ConfigurationType associated to OutputType</returns> string ConvertOutputType(ComboBox cbOutputType) { OutputType[] values = (OutputType[])Enum.GetValues(typeof(OutputType)); OutputType outputType = values[cbOutputType.SelectedIndex]; string subsystem = OutputTypeToSubsystem(outputType); MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(project, helper.Configuration, helper.Platform); group.SetElementMetadata("Link", "SubSystem", subsystem); return(OutputTypeToConfigurationType(outputType)); }
private static void SetElementMetaData(MSBuildItemDefinitionGroup group, string name, string value) { group.SetElementMetadata(metaElement, name, value); }
private static void SpecifyRuntimeLibrary(MSBuildBasedProject project, string configuration, string runtime) { MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(project, new ConfigurationAndPlatform(configuration, null)); group.SetElementMetadata("ClCompile", "RuntimeLibrary", runtime); }