7 overrides of Condition
Microsoft.Build (7)
Construction\ProjectChooseElement.cs (1)
50public override string Condition
Construction\ProjectExtensionsElement.cs (1)
53public override string Condition
Construction\ProjectOtherwiseElement.cs (1)
48public override string Condition
Construction\ProjectRootElement.cs (1)
277public override string Condition
Construction\ProjectUsingTaskBodyElement.cs (1)
52public override string Condition
Construction\ProjectUsingTaskParameterElement.cs (1)
49public override string Condition
Construction\UsingTaskParameterGroupElement.cs (1)
51public override string Condition
81 writes to Condition
installer.tasks (1)
GenerateFileVersionProps.cs (1)
129itemGroup.Condition = "'$(RuntimeIdentifier)' == '' or '$(SelfContained)' != 'true'";
Microsoft.Build (26)
Construction\ProjectTaskElement.cs (2)
248outputItem.Condition = condition; 278outputProperty.Condition = condition;
Construction\ProjectWhenElement.cs (1)
71var when = new ProjectWhenElement(element, containingProject) { Condition = condition };
Construction\Solution\SolutionProjectGenerator.cs (21)
240solutionConfigurationProperties.Condition = GetConditionStringForConfiguration(solutionConfiguration); 885importBefore.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore')"; // Avoids wildcard perf problem 888importAfter.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter')"; // Avoids wildcard perf problem 913directorySolutionPropsPropertyGroup.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and '$(DirectorySolutionPropsPath)' == ''"; 917directorySolutionPropsFileProperty.Condition = "'$(_DirectorySolutionPropsFile)' == ''"; 921directorySolutionPropsBasePathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' == ''"; 925directorySolutionPropsPathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' != '' and '$(_DirectorySolutionPropsFile)' != ''"; 928directorySolutionPropsImport.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and exists('$(DirectorySolutionPropsPath)')"; 931directorySolutionTargetsPropertyGroup.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and '$(DirectorySolutionTargetsPath)' == ''"; 935directorySolutionTargetsFileProperty.Condition = "'$(_DirectorySolutionTargetsFile)' == ''"; 939directorySolutionTargetsBasePathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' == ''"; 943directorySolutionTargetsPathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' != '' and '$(_DirectorySolutionTargetsFile)' != ''"; 946directorySolutionTargetsImport.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and exists('$(DirectorySolutionTargetsPath)')"; 955importBeforeLocal.Condition = @"exists('" + localFile + "')"; 959importAfterLocal.Condition = @"exists('" + localFile + "')"; 2228configurationDefaultingPropertyGroup.Condition = " '$(Configuration)' == '' "; 2234platformDefaultingPropertyGroup.Condition = " '$(Platform)' == '' "; 2262venusConfiguration.Condition = " ('$(AspNetConfiguration)' == '') "; 2299tfv20Property.Condition = "'$(TargetFrameworkVersion)' == '' and '$(MSBuildToolsVersion)' == '2.0'"; 2300tfv35Property.Condition = "'$(TargetFrameworkVersion)' == '' and ('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0')"; 2301tfv40Property.Condition = "'$(TargetFrameworkVersion)' == '' and !('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0' or '$(MSBuildToolsVersion)' == '2.0')";
Instance\ProjectTargetInstance.cs (2)
473target.Condition = Condition; 482taskElement.Condition = taskInstance.Condition;
Microsoft.Build.Engine.OM.UnitTests (45)
Construction\ConstructionEditing_Tests.cs (14)
373target.Condition = "c"; 1725itemGroup.Condition = "c"; 2049itemGroup.Condition = "c"; 2163propertyGroup.Condition = "c"; 2210property1.Condition = "c"; 2234property1.Parent.Condition = "c"; 2327item.Xml.Condition = "false"; 2355metadatum.Xml.Condition = "false"; 2517import.Condition = "c"; 2538ProjectRootElement.Create().CreateImportGroupElement().Condition = "c"; 2604element.Condition = "c"; 2865element.Condition = "c"; 2885ProjectRootElement.Create().CreateImportGroupElement().Condition = "c"; 2951element.Condition = "c";
Construction\ProjectChooseElement_Tests.cs (1)
278when.Condition = "false";
Construction\ProjectImportElement_Tests.cs (1)
220import.Condition = "false";
Construction\ProjectImportGroupElement_Tests.cs (1)
376importGroup.Condition = "c";
Construction\ProjectItemDefinitionElement_Tests.cs (1)
210itemDefinition.Condition = "c";
Construction\ProjectItemDefinitionGroupElement_Tests.cs (1)
106itemDefinitionGroup.Condition = "c";
Construction\ProjectItemElement_Tests.cs (2)
946item.Condition = "c"; 961item.Xml.Condition = "false";
Construction\ProjectItemGroupElement_tests.cs (1)
86itemGroup.Condition = "c";
Construction\ProjectOnErrorElement_Tests.cs (1)
264onError.Condition = "c";
Construction\ProjectOutputElement_Tests.cs (1)
215output.Condition = "c";
Construction\ProjectPropertyElement_Tests.cs (1)
260property.Condition = "c";
Construction\ProjectPropertyGroupElement_Tests.cs (1)
84propertyGroup.Condition = "c";
Construction\ProjectRootElement_Tests.cs (1)
1172target.Condition = "Some Condition";
Construction\ProjectTargetElement_Tests.cs (3)
92target.Condition = "cb"; 155target.Condition = null; 287target.Condition = "c";
Construction\ProjectTaskElement_Tests.cs (1)
292task.Condition = "c";
Construction\ProjectUsingTaskElement_Tests.cs (1)
322usingTask.Condition = "c";
Definition\DefinitionEditing_Tests.cs (3)
421itemElement.Condition = "true"; 1213metadatumElement1.Condition = "true"; 2342itemElement.Condition = "true";
Definition\Project_Tests.cs (8)
211xml.AddItem("i", "i1").Condition = "typo in ''condition''"; 860propertyElement.Condition = "'$(g)'=='v1'"; 899propertyElement.Condition = "'$(g)'=='v1'"; 965propertyElement.Condition = "'$(p0)'=='v0' and '$(p1)'=='v1b'"; 994propertyElement.Condition = "'$(p0)'=='v0' and '$(p1)'=='v1b'"; 1030propertyElement.Condition = "'$(g)'==''"; 2569one.AddImport(four.FullPath).Condition = "false"; // False condition; should not be entered 3902import.Condition = " '$(Something)' == 'nothing' ";
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (2)
176newTarget1.VerifySetter("'Configuration' == 'Foo'", (t) => t.Condition, (t, v) => t.Condition = v); 416when.VerifySetter("Condition", (we) => we.Condition, (we, v) => we.Condition = v);
Microsoft.Build.Engine.UnitTests (9)
BackEnd\TaskRegistry_Tests.cs (5)
1122element.Condition = "'@(ThirdItem)$(Property1)' == 'ThirdValue1Value1'"; 1166element.Condition = "'true' != 'false'"; 1170element.Condition = "false"; 1174element.Condition = "'@(ThirdItem)$(Property1)' == 'ThirdValue1Value1'"; 1178element.Condition = "'@(ThirdItem)$(Property1)' == 'ThirdValue1'";
Evaluation\Evaluator_Tests.cs (1)
2063import.AddProperty("p", "0").Condition = "false";
Evaluation\Preprocessor_Tests.cs (3)
260xml1.AddImport("p2").Condition = "false"; 469group.Condition = "true"; 667xml1.LastChild.Condition = "false";
65 references to Condition
Microsoft.Build (31)
Construction\ProjectPropertyGroupElement.cs (1)
83if (String.Equals(property.Name, name, StringComparison.OrdinalIgnoreCase) && property.Condition.Length == 0)
Construction\ProjectRootElement.cs (5)
933ImportGroupsReversed.FirstOrDefault(importGroup => importGroup.Condition.Length <= 0); 994if (itemGroup.Condition.Length > 0) 1070if (itemDefinitionGroup.Condition.Length > 0) 1169if (propertyGroup.Condition.Length > 0) 1181if (property.Condition.Length > 0)
Construction\ProjectWhenElement.cs (1)
89return owner.CreateWhenElement(Condition);
Definition\Project.cs (3)
3062if (group.Condition.Length > 0) 3438if (candidateExistingItemXml.Condition.Length != 0 || candidateExistingItemXml.Exclude.Length != 0 || !candidateExistingItemXml.IncludeHasWildcards) 3862if (itemGroupXml.Condition.Length > 0)
Evaluation\Evaluator.cs (14)
435output.Condition, 448output.Condition, 472ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 476ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 487ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 509metadataElement.Condition, 524itemElement.Condition, 538ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 585targetElement.Condition, 1587var newExpandedCondition = importElement.Condition.Replace(extensionPropertyRefAsString, extensionPathExpanded, StringComparison.OrdinalIgnoreCase); 1691string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.ExpandProperties | ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation); 1701importElement.Condition, 2378return EvaluateCondition(element, element.Condition, expanderOptions, parserOptions); 2406return EvaluateConditionCollectingConditionedProperties(element, element.Condition, expanderOptions, parserOptions, projectRootElementCache);
Evaluation\LazyItemEvaluator.cs (2)
67return EvaluateCondition(element.Condition, element, expanderOptions, parserOptions, _expander, this); 645metadatumElement.Condition,
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (3)
208if (!EvaluateCondition(metadataElement.Condition, metadataElement, metadataExpansionOptions, ParserOptions.AllowAll, _expander, _lazyEvaluator)) 241metadataElement.Condition, 278yield return metadataElement.Condition;
Instance\ProjectTaskInstance.cs (1)
106_condition = element.Condition;
Instance\TaskRegistry.cs (1)
302projectUsingTaskXml.Condition,
Microsoft.Build.Engine.OM.UnitTests (34)
Construction\ProjectChooseElement_Tests.cs (2)
226Assert.Equal("c1", whens[0].Condition); 227Assert.Equal("c2", whens[1].Condition);
Construction\ProjectImportElement_Tests.cs (1)
106Assert.Equal("c", imports[1].Condition);
Construction\ProjectImportGroupElement_Tests.cs (3)
275Assert.Equal("c", imports[1].Condition); 310Assert.Equal("c", imports[1].Condition); 378Assert.Equal("c", importGroup.Condition);
Construction\ProjectItemDefinitionElement_Tests.cs (2)
119Assert.Equal("c", metadata[1].Condition); 212Assert.Equal("c", itemDefinition.Condition);
Construction\ProjectItemDefinitionGroupElement_Tests.cs (2)
92Assert.Equal("c", itemDefinitionGroups[0].Condition); 108Assert.Equal("c", itemDefinitionGroup.Condition);
Construction\ProjectItemElement_Tests.cs (2)
421Assert.Equal("c", metadata[1].Condition); 948Assert.Equal("c", item.Condition);
Construction\ProjectItemGroupElement_tests.cs (1)
88Assert.Equal("c", itemGroup.Condition);
Construction\ProjectMetadataElement_Tests.cs (1)
40Assert.Equal("c", metadatum.Condition);
Construction\ProjectOnErrorElement_Tests.cs (2)
29Assert.Equal("c", onError.Condition); 266Assert.Equal("c", onError.Condition);
Construction\ProjectOutputElement_Tests.cs (1)
216Assert.Equal("c", output.Condition);
Construction\ProjectPropertyElement_Tests.cs (2)
30Assert.Equal("c", property.Condition); 261Assert.Equal("c", property.Condition);
Construction\ProjectPropertyGroupElement_Tests.cs (1)
86Assert.Equal("c", propertyGroup.Condition);
Construction\ProjectTargetElement_Tests.cs (4)
78Assert.Equal("c", target.Condition); 97Assert.Equal("cb", target.Condition); 157Assert.Equal(String.Empty, target.Condition); 289Assert.Equal("c", target.Condition);
Construction\ProjectTaskElement_Tests.cs (2)
77Assert.Equal("c", task.Condition); 293Assert.Equal("c", task.Condition);
Construction\ProjectUsingTaskElement_Tests.cs (4)
195Assert.Equal(String.Empty, usingTask.Condition); 209Assert.Equal("c", usingTask.Condition); 223Assert.Equal("c", usingTask.Condition); 323Assert.Equal("c", usingTask.Condition);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
407ValidateEqualWithException(() => viewXml.Condition, () => realXml.Condition);
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (2)
176newTarget1.VerifySetter("'Configuration' == 'Foo'", (t) => t.Condition, (t, v) => t.Condition = v); 416when.VerifySetter("Condition", (we) => we.Condition, (we, v) => we.Condition = v);