7 overrides of Condition
Microsoft.Build (7)
Construction\ProjectChooseElement.cs (1)
52public 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)
239solutionConfigurationProperties.Condition = GetConditionStringForConfiguration(solutionConfiguration); 940importBefore.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore')"; // Avoids wildcard perf problem 943importAfter.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter')"; // Avoids wildcard perf problem 968directorySolutionPropsPropertyGroup.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and '$(DirectorySolutionPropsPath)' == ''"; 972directorySolutionPropsFileProperty.Condition = "'$(_DirectorySolutionPropsFile)' == ''"; 976directorySolutionPropsBasePathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' == ''"; 980directorySolutionPropsPathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' != '' and '$(_DirectorySolutionPropsFile)' != ''"; 983directorySolutionPropsImport.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and exists('$(DirectorySolutionPropsPath)')"; 986directorySolutionTargetsPropertyGroup.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and '$(DirectorySolutionTargetsPath)' == ''"; 990directorySolutionTargetsFileProperty.Condition = "'$(_DirectorySolutionTargetsFile)' == ''"; 994directorySolutionTargetsBasePathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' == ''"; 998directorySolutionTargetsPathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' != '' and '$(_DirectorySolutionTargetsFile)' != ''"; 1001directorySolutionTargetsImport.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and exists('$(DirectorySolutionTargetsPath)')"; 1087importBeforeLocal.Condition = $"exists('{localFile}')"; 1091importAfterLocal.Condition = $"exists('{localFile}')"; 2306configurationDefaultingPropertyGroup.Condition = " '$(Configuration)' == '' "; 2312platformDefaultingPropertyGroup.Condition = " '$(Platform)' == '' "; 2340venusConfiguration.Condition = " ('$(AspNetConfiguration)' == '') "; 2377tfv20Property.Condition = "'$(TargetFrameworkVersion)' == '' and '$(MSBuildToolsVersion)' == '2.0'"; 2378tfv35Property.Condition = "'$(TargetFrameworkVersion)' == '' and ('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0')"; 2379tfv40Property.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)
2943if (group.Condition.Length > 0) 3323if (candidateExistingItemXml.Condition.Length != 0 || candidateExistingItemXml.Exclude.Length != 0 || !candidateExistingItemXml.IncludeHasWildcards) 3748if (itemGroupXml.Condition.Length > 0)
Evaluation\Evaluator.cs (14)
528output.Condition, 541output.Condition, 565ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 569ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 580ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 602metadataElement.Condition, 617itemElement.Condition, 631ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 678targetElement.Condition, 1757var newExpandedCondition = importElement.Condition.Replace(extensionPropertyRefAsString, extensionPathExpanded, StringComparison.OrdinalIgnoreCase); 1861string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.ExpandProperties | ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation); 1871importElement.Condition, 2578return EvaluateCondition(element, element.Condition, expanderOptions, parserOptions); 2606return 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)
234projectUsingTaskXml.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)