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)
293public 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)
549itemGroup.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)
957ImportGroupsReversed.FirstOrDefault(importGroup => importGroup.Condition.Length <= 0); 1018if (itemGroup.Condition.Length > 0) 1094if (itemDefinitionGroup.Condition.Length > 0) 1193if (propertyGroup.Condition.Length > 0) 1205if (property.Condition.Length > 0)
Construction\ProjectWhenElement.cs (1)
90return owner.CreateWhenElement(Condition);
Definition\Project.cs (3)
3140if (group.Condition.Length > 0) 3529if (candidateExistingItemXml.Condition.Length != 0 || candidateExistingItemXml.Exclude.Length != 0 || !candidateExistingItemXml.IncludeHasWildcards) 3968if (itemGroupXml.Condition.Length > 0)
Evaluation\Evaluator.cs (14)
464output.Condition, 477output.Condition, 501ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 505ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 516ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 538metadataElement.Condition, 553itemElement.Condition, 567ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 614targetElement.Condition, 1655var newExpandedCondition = importElement.Condition.Replace(extensionPropertyRefAsString, extensionPathExpanded, StringComparison.OrdinalIgnoreCase); 1759string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.ExpandProperties | ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation); 1769importElement.Condition, 2478return EvaluateCondition(element, element.Condition, expanderOptions, parserOptions); 2506return 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)
531.Where(itemGroupElement => condition is null || itemGroupElement.Condition == condition)