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)
240solutionConfigurationProperties.Condition = GetConditionStringForConfiguration(solutionConfiguration); 932importBefore.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore')"; // Avoids wildcard perf problem 935importAfter.Condition = @"'$(ImportByWildcardBeforeSolution)' != 'false' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter')"; // Avoids wildcard perf problem 960directorySolutionPropsPropertyGroup.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and '$(DirectorySolutionPropsPath)' == ''"; 964directorySolutionPropsFileProperty.Condition = "'$(_DirectorySolutionPropsFile)' == ''"; 968directorySolutionPropsBasePathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' == ''"; 972directorySolutionPropsPathProperty.Condition = "'$(_DirectorySolutionPropsBasePath)' != '' and '$(_DirectorySolutionPropsFile)' != ''"; 975directorySolutionPropsImport.Condition = "'$(ImportDirectorySolutionProps)' != 'false' and exists('$(DirectorySolutionPropsPath)')"; 978directorySolutionTargetsPropertyGroup.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and '$(DirectorySolutionTargetsPath)' == ''"; 982directorySolutionTargetsFileProperty.Condition = "'$(_DirectorySolutionTargetsFile)' == ''"; 986directorySolutionTargetsBasePathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' == ''"; 990directorySolutionTargetsPathProperty.Condition = "'$(_DirectorySolutionTargetsBasePath)' != '' and '$(_DirectorySolutionTargetsFile)' != ''"; 993directorySolutionTargetsImport.Condition = "'$(ImportDirectorySolutionTargets)' != 'false' and exists('$(DirectorySolutionTargetsPath)')"; 1079importBeforeLocal.Condition = $"exists('{localFile}')"; 1083importAfterLocal.Condition = $"exists('{localFile}')"; 2298configurationDefaultingPropertyGroup.Condition = " '$(Configuration)' == '' "; 2304platformDefaultingPropertyGroup.Condition = " '$(Platform)' == '' "; 2332venusConfiguration.Condition = " ('$(AspNetConfiguration)' == '') "; 2369tfv20Property.Condition = "'$(TargetFrameworkVersion)' == '' and '$(MSBuildToolsVersion)' == '2.0'"; 2370tfv35Property.Condition = "'$(TargetFrameworkVersion)' == '' and ('$(MSBuildToolsVersion)' == '3.5' or '$(MSBuildToolsVersion)' == '3.0')"; 2371tfv40Property.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)
3071if (group.Condition.Length > 0) 3447if (candidateExistingItemXml.Condition.Length != 0 || candidateExistingItemXml.Exclude.Length != 0 || !candidateExistingItemXml.IncludeHasWildcards) 3872if (itemGroupXml.Condition.Length > 0)
Evaluation\Evaluator.cs (14)
448output.Condition, 461output.Condition, 485ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 489ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 500ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 522metadataElement.Condition, 537itemElement.Condition, 551ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 598targetElement.Condition, 1606var newExpandedCondition = importElement.Condition.Replace(extensionPropertyRefAsString, extensionPathExpanded, StringComparison.OrdinalIgnoreCase); 1710string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.ExpandProperties | ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation); 1720importElement.Condition, 2429return EvaluateCondition(element, element.Condition, expanderOptions, parserOptions); 2457return 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)
292projectUsingTaskXml.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)