예제 #1
0
        static void RemoveOutputTypeIfHasDefaultValue(MSBuildProject project, MSBuildPropertyGroup globalPropertyGroup)
        {
            string outputType = project.EvaluatedProperties.GetValue("OutputType");

            if (string.IsNullOrEmpty(outputType))
            {
                globalPropertyGroup.RemoveProperty("OutputType");
            }
            else
            {
                RemovePropertyIfHasDefaultValue(globalPropertyGroup, "OutputType", outputType);
            }
        }
예제 #2
0
        static void RemovePropertyIfHasDefaultValue(
            MSBuildPropertyGroup propertyGroup,
            string propertyName,
            string defaultPropertyValue)
        {
            if (!propertyGroup.HasProperty(propertyName))
            {
                return;
            }

            if (propertyGroup.GetValue(propertyName) == defaultPropertyValue)
            {
                propertyGroup.RemoveProperty(propertyName);
            }
        }
예제 #3
0
 bool IPropertySet.RemoveProperty(string name)
 {
     AssertLinkedToGroup();
     return(LinkedGroup.RemoveProperty(name));
 }