7 overrides of Condition
Microsoft.Build (7)
Construction\ProjectChooseElement.cs (1)
51public override string Condition
Construction\ProjectExtensionsElement.cs (1)
53public override string Condition
Construction\ProjectOtherwiseElement.cs (1)
49public override string Condition
Construction\ProjectRootElement.cs (1)
295public override string Condition
Construction\ProjectUsingTaskBodyElement.cs (1)
53public override string Condition
Construction\ProjectUsingTaskParameterElement.cs (1)
49public override string Condition
Construction\UsingTaskParameterGroupElement.cs (1)
51public override string Condition
29 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)
72var when = new ProjectWhenElement(element, containingProject) { Condition = condition };
Construction\Solution\SolutionProjectGenerator.cs (21)
242solutionConfigurationProperties.Condition = GetConditionStringForConfiguration(solutionConfiguration); 937importBefore.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore')"; // Avoids wildcard perf problem 940importAfter.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter')"; // Avoids wildcard perf problem 965directorySolutionPropsPropertyGroup.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and '$(DirectorySolutionPropsPath)' == ''"; 969directorySolutionPropsFileProperty.Condition = "'$(_DirectorySolutionPropsFile)' == ''"; 973directorySolutionPropsBasePathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' == ''"; 977directorySolutionPropsPathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' != '' and '$(_DirectorySolutionPropsFile)' != ''"; 980directorySolutionPropsImport.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and exists('$(DirectorySolutionPropsPath)')"; 983directorySolutionTargetsPropertyGroup.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and '$(DirectorySolutionTargetsPath)' == ''"; 987directorySolutionTargetsFileProperty.Condition = "'$(_DirectorySolutionTargetsFile)' == ''"; 991directorySolutionTargetsBasePathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' == ''"; 995directorySolutionTargetsPathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' != '' and '$(_DirectorySolutionTargetsFile)' != ''"; 998directorySolutionTargetsImport.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and exists('$(DirectorySolutionTargetsPath)')"; 1084importBeforeLocal.Condition = $"exists('{localFile}')"; 1088importAfterLocal.Condition = $"exists('{localFile}')"; 2304configurationDefaultingPropertyGroup.Condition = " '$(Configuration)' == '' "; 2310platformDefaultingPropertyGroup.Condition = " '$(Platform)' == '' "; 2338venusConfiguration.Condition = " ('$(AspNetConfiguration)' == '') "; 2375tfv20Property.Condition = "'$(TargetFrameworkVersion)' == '' and '$(MSBuildToolsVersion)' == '2.0'"; 2376tfv35Property.Condition = "'$(TargetFrameworkVersion)' == '' and ('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0')"; 2377tfv40Property.Condition = "'$(TargetFrameworkVersion)' == '' and !('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0' or '$(MSBuildToolsVersion)' == '2.0')";
Instance\ProjectTargetInstance.cs (2)
472target.Condition = Condition; 481taskElement.Condition = taskInstance.Condition;
Microsoft.DotNet.Cli.Utils (1)
Extensions\MSBuildProjectExtensions.cs (1)
58ret.Condition = condStr;
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
550itemGroup.Condition = condition;
36 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)
959ImportGroupsReversed.FirstOrDefault(importGroup => importGroup.Condition.Length <= 0); 1020if (itemGroup.Condition.Length > 0) 1096if (itemDefinitionGroup.Condition.Length > 0) 1195if (propertyGroup.Condition.Length > 0) 1207if (property.Condition.Length > 0)
Construction\ProjectWhenElement.cs (1)
90return owner.CreateWhenElement(Condition);
Definition\Project.cs (3)
2942if (group.Condition.Length > 0) 3319if (candidateExistingItemXml.Condition.Length != 0 || candidateExistingItemXml.Exclude.Length != 0 || !candidateExistingItemXml.IncludeHasWildcards) 3744if (itemGroupXml.Condition.Length > 0)
Evaluation\Evaluator.cs (14)
484output.Condition, 497output.Condition, 521ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 525ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 536ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 558metadataElement.Condition, 573itemElement.Condition, 587ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 634targetElement.Condition, 1685var newExpandedCondition = importElement.Condition.Replace(extensionPropertyRefAsString, extensionPathExpanded, StringComparison.OrdinalIgnoreCase); 1789string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.ExpandProperties | ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation); 1799importElement.Condition, 2508return EvaluateCondition(element, element.Condition, expanderOptions, parserOptions); 2536return EvaluateConditionCollectingConditionedProperties(element, element.Condition, expanderOptions, parserOptions, projectRootElementCache);
Evaluation\LazyItemEvaluator.cs (2)
67return EvaluateCondition(element.Condition, element, expanderOptions, parserOptions, _expander, this); 650metadatumElement.Condition,
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (3)
207if (!EvaluateCondition(metadataElement.Condition, metadataElement, metadataExpansionOptions, ParserOptions.AllowAll, _expander, _lazyEvaluator)) 240metadataElement.Condition, 281expression = metadataElement.Condition;
Instance\ProjectTaskInstance.cs (1)
105_condition = element.Condition;
Instance\TaskRegistry.cs (1)
293projectUsingTaskXml.Condition,
Microsoft.DotNet.Cli.Utils (4)
Extensions\MSBuildProjectExtensions.cs (4)
25if (!string.IsNullOrEmpty(projectElement.Condition)) 27conditionChainSet.Add(projectElement.Condition); 32if (!string.IsNullOrEmpty(parent.Condition)) 34conditionChainSet.Add(parent.Condition);
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
532.Where(itemGroupElement => condition is null || itemGroupElement.Condition == condition)