407 references to XMakeAttributes
Microsoft.Build (395)
BackEnd\Client\MSBuildClient.cs (1)
673
architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture()),
BackEnd\Components\Communications\NodeEndpointOutOfProc.cs (1)
40
architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture(),
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
73
return new Handshake(CommunicationsUtilities.GetHandshakeOptions(taskHost: false, taskHostParameters: TaskHostParameters.Empty, architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture(), nodeReuse: enableNodeReuse, lowPriority: enableLowPriority));
91
Handshake hostHandshake = new(CommunicationsUtilities.GetHandshakeOptions(taskHost: false, taskHostParameters: TaskHostParameters.Empty, architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture(), nodeReuse: ComponentHost.BuildParameters.EnableNodeReuse, lowPriority: ComponentHost.BuildParameters.LowPriority));
BackEnd\Components\RequestBuilder\TaskBuilder.cs (8)
560
msbuildArchitecture = msbuildArchitecture == string.Empty ?
XMakeAttributes
.MSBuildArchitectureValues.any : msbuildArchitecture.Trim();
561
msbuildRuntime = msbuildRuntime == string.Empty ?
XMakeAttributes
.MSBuildRuntimeValues.any : msbuildRuntime.Trim();
716
if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.errorAndContinue, expandedValue, StringComparison.OrdinalIgnoreCase))
720
else if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.warnAndContinue, expandedValue, StringComparison.OrdinalIgnoreCase))
724
else if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.errorAndStop, expandedValue, StringComparison.OrdinalIgnoreCase))
1141
XMakeAttributes
.itemName,
1159
XMakeAttributes
.propertyName,
1172
XMakeAttributes
.taskParameter,
BackEnd\Node\OutOfProcServerNode.cs (1)
127
CommunicationsUtilities.GetHandshakeOptions(taskHost: false, taskHostParameters: TaskHostParameters.Empty, architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture()),
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
1229
returnClass.FactoryIdentityParameters.Runtime ??
XMakeAttributes
.MSBuildRuntimeValues.any,
1230
returnClass.FactoryIdentityParameters.Architecture ??
XMakeAttributes
.MSBuildArchitectureValues.any,
1231
taskIdentityParameters.Runtime ??
XMakeAttributes
.MSBuildRuntimeValues.any,
1232
taskIdentityParameters.Architecture ??
XMakeAttributes
.MSBuildArchitectureValues.any);
2117
TaskHostParameters taskHostParameters = new(
XMakeAttributes
.GetCurrentMSBuildRuntime(),
XMakeAttributes
.GetCurrentMSBuildArchitecture());
Construction\ProjectElement.cs (6)
112
return GetAttributeValue(
XMakeAttributes
.condition, ref _condition);
118
SetOrRemoveAttribute(
XMakeAttributes
.condition, value, ref _condition, "Set condition {0}", value);
132
return GetAttributeValue(
XMakeAttributes
.label);
138
SetOrRemoveAttribute(
XMakeAttributes
.label, value, "Set label {0}", value);
279
public virtual ElementLocation ConditionLocation => GetAttributeLocation(
XMakeAttributes
.condition);
285
public ElementLocation LabelLocation => GetAttributeLocation(
XMakeAttributes
.label);
Construction\ProjectImportElement.cs (12)
56
get => FileUtilities.FixFilePath(GetAttributeValue(
XMakeAttributes
.project));
59
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.project);
61
SetOrRemoveAttribute(
XMakeAttributes
.project, value, "Set Import Project {0}", value);
68
public ElementLocation ProjectLocation => GetAttributeLocation(
XMakeAttributes
.project);
75
get => FileUtilities.FixFilePath(GetAttributeValue(
XMakeAttributes
.sdk));
78
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.sdk);
81
SetOrRemoveAttribute(
XMakeAttributes
.sdk, value, "Set Import Sdk {0}", value);
91
get => GetAttributeValue(
XMakeAttributes
.sdkVersion);
96
SetOrRemoveAttribute(
XMakeAttributes
.sdkVersion, value, "Set Import Version {0}", value);
106
get => GetAttributeValue(
XMakeAttributes
.sdkMinimumVersion);
111
SetOrRemoveAttribute(
XMakeAttributes
.sdkMinimumVersion, value, "Set Import Minimum Version {0}", value);
119
public ElementLocation SdkLocation => GetAttributeLocation(
XMakeAttributes
.sdk);
Construction\ProjectItemElement.cs (46)
100
return GetAttributeValue(
XMakeAttributes
.include, ref _include);
105
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName,
XMakeAttributes
.include,
XMakeAttributes
.remove,
XMakeAttributes
.update);
106
SetOrRemoveAttribute(
XMakeAttributes
.include, value, ref _include, "Set item Include {0}", value);
122
return GetAttributeValue(
XMakeAttributes
.exclude, ref _exclude);
127
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Remove.Length == 0, "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.exclude,
XMakeAttributes
.remove);
128
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Update.Length == 0, "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.exclude,
XMakeAttributes
.update);
129
SetOrRemoveAttribute(
XMakeAttributes
.exclude, value, ref _exclude, "Set item Exclude {0}", value);
144
return GetAttributeValue(
XMakeAttributes
.remove, ref _remove);
149
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Include.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName,
XMakeAttributes
.include,
XMakeAttributes
.remove,
XMakeAttributes
.update);
150
SetOrRemoveAttribute(
XMakeAttributes
.remove, value, ref _remove, "Set item Remove {0}", value);
163
return GetAttributeValue(
XMakeAttributes
.update, ref _update);
168
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Include.Length == 0), "OM_OneOfAttributeButNotMore", ElementName,
XMakeAttributes
.include,
XMakeAttributes
.remove,
XMakeAttributes
.update);
169
SetOrRemoveAttribute(
XMakeAttributes
.update, value, ref _update, "Set item Update {0}", value);
183
return GetAttributeValue(
XMakeAttributes
.matchOnMetadata, ref _matchOnMetadata);
191
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length != 0, "OM_MatchOnMetadataOnlyApplicableToRemoveItems", ElementName,
XMakeAttributes
.matchOnMetadata);
192
SetOrRemoveAttribute(
XMakeAttributes
.matchOnMetadata, value, ref _matchOnMetadata, "Set item MatchOnMetadata {0}", value);
206
return GetAttributeValue(
XMakeAttributes
.matchOnMetadataOptions);
211
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || MatchOnMetadata.Length != 0, "OM_MatchOnMetadataOptionsOnlyApplicableToItemsWithMatchOnMetadata", ElementName,
XMakeAttributes
.matchOnMetadataOptions);
212
SetOrRemoveAttribute(
XMakeAttributes
.matchOnMetadataOptions, value, "Set item MatchOnMetadataOptions {0}", value);
226
return GetAttributeValue(
XMakeAttributes
.keepMetadata);
232
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.removeMetadata,
XMakeAttributes
.keepMetadata);
233
SetOrRemoveAttribute(
XMakeAttributes
.keepMetadata, value, "Set item KeepMetadata {0}", value);
247
return GetAttributeValue(
XMakeAttributes
.removeMetadata);
253
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || KeepMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.keepMetadata,
XMakeAttributes
.removeMetadata);
254
SetOrRemoveAttribute(
XMakeAttributes
.removeMetadata, value, "Set item RemoveMetadata {0}", value);
268
return GetAttributeValue(
XMakeAttributes
.keepDuplicates);
274
SetOrRemoveAttribute(
XMakeAttributes
.keepDuplicates, value, "Set item KeepDuplicates {0}", value);
296
public ElementLocation IncludeLocation => GetAttributeLocation(
XMakeAttributes
.include);
301
public ElementLocation ExcludeLocation => GetAttributeLocation(
XMakeAttributes
.exclude);
306
public ElementLocation RemoveLocation => GetAttributeLocation(
XMakeAttributes
.remove);
311
public ElementLocation UpdateLocation => GetAttributeLocation(
XMakeAttributes
.update);
316
public ElementLocation MatchOnMetadataLocation => GetAttributeLocation(
XMakeAttributes
.matchOnMetadata);
321
public ElementLocation MatchOnMetadataOptionsLocation => GetAttributeLocation(
XMakeAttributes
.matchOnMetadataOptions);
326
public ElementLocation KeepMetadataLocation => GetAttributeLocation(
XMakeAttributes
.keepMetadata);
331
public ElementLocation RemoveMetadataLocation => GetAttributeLocation(
XMakeAttributes
.removeMetadata);
336
public ElementLocation KeepDuplicatesLocation => GetAttributeLocation(
XMakeAttributes
.keepDuplicates);
Construction\ProjectOnErrorElement.cs (4)
55
return GetAttributeValue(
XMakeAttributes
.executeTargets);
60
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.executeTargets);
61
SetOrRemoveAttribute(
XMakeAttributes
.executeTargets, value, "Set OnError ExecuteTargets {0}", value);
69
public ElementLocation ExecuteTargetsLocation => GetAttributeLocation(
XMakeAttributes
.executeTargets);
Construction\ProjectOutputElement.cs (15)
54
return GetAttributeValue(
XMakeAttributes
.taskParameter);
61
SetOrRemoveAttribute(
XMakeAttributes
.taskParameter, value, "Set Output TaskParameter {0}", value);
88
return GetAttributeValue(
XMakeAttributes
.itemName);
93
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(PropertyName), "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.itemName,
XMakeAttributes
.propertyName);
94
SetOrRemoveAttribute(
XMakeAttributes
.itemName, value, "Set Output ItemType {0}", value);
108
return GetAttributeValue(
XMakeAttributes
.propertyName);
113
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(ItemType), "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.itemName,
XMakeAttributes
.propertyName);
114
SetOrRemoveAttribute(
XMakeAttributes
.propertyName, value, "Set Output PropertyName {0}", value);
121
public ElementLocation TaskParameterLocation => GetAttributeLocation(
XMakeAttributes
.taskParameter);
126
public ElementLocation PropertyNameLocation => GetAttributeLocation(
XMakeAttributes
.propertyName);
131
public ElementLocation ItemTypeLocation => GetAttributeLocation(
XMakeAttributes
.itemName);
145
XMakeAttributes
.propertyName,
146
XMakeAttributes
.itemName);
Construction\ProjectRootElement.cs (15)
501
get => GetAttributeValue(
XMakeAttributes
.defaultTargets);
504
set => SetOrRemoveAttribute(
XMakeAttributes
.defaultTargets, value, "Set Project DefaultTargets to '{0}'", value);
514
get => GetAttributeValue(
XMakeAttributes
.initialTargets);
517
set => SetOrRemoveAttribute(
XMakeAttributes
.initialTargets, value, "Set project InitialTargets to '{0}'", value);
529
get => GetAttributeValue(
XMakeAttributes
.sdk);
532
set => SetOrRemoveAttribute(
XMakeAttributes
.sdk, value, "Set project Sdk to '{0}'", value);
542
get => GetAttributeValue(
XMakeAttributes
.treatAsLocalProperty);
545
set => SetOrRemoveAttribute(
XMakeAttributes
.treatAsLocalProperty, value, "Set project TreatAsLocalProperty to '{0}'", value);
555
get => GetAttributeValue(
XMakeAttributes
.toolsVersion);
558
set => SetOrRemoveAttribute(
XMakeAttributes
.toolsVersion, value, "Set project ToolsVersion {0}", value);
661
public ElementLocation ToolsVersionLocation => GetAttributeLocation(
XMakeAttributes
.toolsVersion);
666
public ElementLocation DefaultTargetsLocation => GetAttributeLocation(
XMakeAttributes
.defaultTargets);
671
public ElementLocation InitialTargetsLocation => GetAttributeLocation(
XMakeAttributes
.initialTargets);
676
public ElementLocation SdkLocation => GetAttributeLocation(
XMakeAttributes
.sdk);
681
public ElementLocation TreatAsLocalPropertyLocation => GetAttributeLocation(
XMakeAttributes
.treatAsLocalProperty);
Construction\ProjectSdkElement.cs (10)
47
get => GetAttributeValue(
XMakeAttributes
.sdkName);
50
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.sdkName);
51
SetOrRemoveAttribute(
XMakeAttributes
.sdkName, value, $"Set SDK Name to {value}",
XMakeAttributes
.sdkName);
60
get => GetAttributeValue(
XMakeAttributes
.sdkVersion);
63
SetOrRemoveAttribute(
XMakeAttributes
.sdkVersion, value, $"Set SDK Version to {value}",
XMakeAttributes
.sdkVersion);
72
get => GetAttributeValue(
XMakeAttributes
.sdkMinimumVersion);
75
SetOrRemoveAttribute(
XMakeAttributes
.sdkMinimumVersion, value, $"Set SDK MinimumVersion to {value}",
XMakeAttributes
.sdkMinimumVersion);
Construction\ProjectTargetElement.cs (30)
94
string unescapedValue = EscapingUtilities.UnescapeAll(GetAttributeValue(
XMakeAttributes
.name));
115
SetOrRemoveAttribute(
XMakeAttributes
.name, unescapedValue, "Set target Name {0}", value);
130
return GetAttributeValue(
XMakeAttributes
.inputs);
135
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.inputs);
136
SetOrRemoveAttribute(
XMakeAttributes
.inputs, value, "Set target Inputs {0}", value);
150
return GetAttributeValue(
XMakeAttributes
.outputs);
155
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.outputs);
156
SetOrRemoveAttribute(
XMakeAttributes
.outputs, value, "Set target Outputs {0}", value);
170
string value = GetAttributeValue(
XMakeAttributes
.keepDuplicateOutputs);
183
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.keepDuplicateOutputs);
184
SetOrRemoveAttribute(
XMakeAttributes
.keepDuplicateOutputs, value, "Set target KeepDuplicateOutputs {0}", value);
198
return GetAttributeValue(
XMakeAttributes
.dependsOnTargets);
203
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.dependsOnTargets);
204
SetOrRemoveAttribute(
XMakeAttributes
.dependsOnTargets, value, "Set target DependsOnTargets {0}", value);
218
return GetAttributeValue(
XMakeAttributes
.beforeTargets);
223
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.beforeTargets);
224
SetOrRemoveAttribute(
XMakeAttributes
.beforeTargets, value, "Set target BeforeTargets {0}", value);
238
return GetAttributeValue(
XMakeAttributes
.afterTargets);
243
ArgumentNullException.ThrowIfNull(value,
XMakeAttributes
.afterTargets);
244
SetOrRemoveAttribute(
XMakeAttributes
.afterTargets, value, "Set target AfterTargets {0}", value);
259
return GetAttributeValue(
XMakeAttributes
.returns, true /* If the element is not there, return null */);
272
XMakeAttributes
.returns,
293
public ElementLocation NameLocation => GetAttributeLocation(
XMakeAttributes
.name);
298
public ElementLocation InputsLocation => GetAttributeLocation(
XMakeAttributes
.inputs);
303
public ElementLocation OutputsLocation => GetAttributeLocation(
XMakeAttributes
.outputs);
312
ElementLocation location = GetAttributeLocation(
XMakeAttributes
.keepDuplicateOutputs);
327
public ElementLocation DependsOnTargetsLocation => GetAttributeLocation(
XMakeAttributes
.dependsOnTargets);
332
public ElementLocation BeforeTargetsLocation => GetAttributeLocation(
XMakeAttributes
.beforeTargets);
337
public ElementLocation ReturnsLocation => GetAttributeLocation(
XMakeAttributes
.returns);
342
public ElementLocation AfterTargetsLocation => GetAttributeLocation(
XMakeAttributes
.afterTargets);
Construction\ProjectTaskElement.cs (12)
70
return GetAttributeValue(
XMakeAttributes
.continueOnError);
76
SetOrRemoveAttribute(
XMakeAttributes
.continueOnError, value, "Set task ContinueOnError {0}", value);
90
return GetAttributeValue(
XMakeAttributes
.msbuildRuntime);
96
SetOrRemoveAttribute(
XMakeAttributes
.msbuildRuntime, value, "Set task MSBuildRuntime {0}", value);
110
return GetAttributeValue(
XMakeAttributes
.msbuildArchitecture);
116
SetOrRemoveAttribute(
XMakeAttributes
.msbuildArchitecture, value, "Set task MSBuildArchitecture {0}", value);
194
public ElementLocation ContinueOnErrorLocation => GetAttributeLocation(
XMakeAttributes
.continueOnError);
200
public ElementLocation MSBuildRuntimeLocation => GetAttributeLocation(
XMakeAttributes
.msbuildRuntime);
206
public ElementLocation MSBuildArchitectureLocation => GetAttributeLocation(
XMakeAttributes
.msbuildArchitecture);
327
ErrorUtilities.VerifyThrowArgument(!
XMakeAttributes
.IsSpecialTaskAttribute(name), "CannotAccessKnownAttributes", name);
376
if (!
XMakeAttributes
.IsSpecialTaskAttribute(attribute.Name))
448
if (!
XMakeAttributes
.IsSpecialTaskAttribute(attribute.Name))
Construction\ProjectUsingTaskBodyElement.cs (3)
89
string evaluateAttribute = GetAttributeValue(
XMakeAttributes
.evaluate);
101
SetOrRemoveAttribute(
XMakeAttributes
.evaluate, value, "Set usingtask Evaluate {0}", value);
116
public ElementLocation EvaluateLocation => GetAttributeLocation(
XMakeAttributes
.evaluate) ?? Location;
Construction\ProjectUsingTaskElement.cs (30)
52
GetAttributeValue(
XMakeAttributes
.assemblyFile));
56
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.assemblyName);
57
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyName), "OM_EitherAttributeButNotBoth", ElementName,
XMakeAttributes
.assemblyFile,
XMakeAttributes
.assemblyName);
59
SetOrRemoveAttribute(
XMakeAttributes
.assemblyFile, value, "Set usingtask AssemblyFile {0}", value);
69
get => GetAttributeValue(
XMakeAttributes
.assemblyName);
73
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.assemblyName);
74
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyFile), "OM_EitherAttributeButNotBoth", XMakeElements.usingTask,
XMakeAttributes
.assemblyFile,
XMakeAttributes
.assemblyName);
75
SetOrRemoveAttribute(
XMakeAttributes
.assemblyName, value, "Set usingtask AssemblyName {0}", value);
84
get => GetAttributeValue(
XMakeAttributes
.taskName);
88
ArgumentException.ThrowIfNullOrEmpty(value,
XMakeAttributes
.taskName);
89
SetOrRemoveAttribute(
XMakeAttributes
.taskName, value, "Set usingtask TaskName {0}", value);
98
get => GetAttributeValue(
XMakeAttributes
.taskFactory);
102
SetOrRemoveAttribute(
XMakeAttributes
.taskFactory, value, "Set usingtask TaskFactory {0}", value);
111
get => GetAttributeValue(
XMakeAttributes
.runtime);
115
SetOrRemoveAttribute(
XMakeAttributes
.runtime, value, "Set usingtask Runtime {0}", value);
124
get => GetAttributeValue(
XMakeAttributes
.architecture);
128
SetOrRemoveAttribute(
XMakeAttributes
.architecture, value, "Set usingtask Architecture {0}", value);
137
get => GetAttributeValue(
XMakeAttributes
.overrideUsingTask);
141
SetOrRemoveAttribute(
XMakeAttributes
.overrideUsingTask, value, "Set usingtask Override {0}", value);
172
public ElementLocation TaskNameLocation => GetAttributeLocation(
XMakeAttributes
.taskName);
177
public ElementLocation AssemblyFileLocation => GetAttributeLocation(
XMakeAttributes
.assemblyFile);
182
public ElementLocation AssemblyNameLocation => GetAttributeLocation(
XMakeAttributes
.assemblyName);
187
public ElementLocation RuntimeLocation => GetAttributeLocation(
XMakeAttributes
.runtime);
192
public ElementLocation ArchitectureLocation => GetAttributeLocation(
XMakeAttributes
.architecture);
197
public ElementLocation TaskFactoryLocation => GetAttributeLocation(
XMakeAttributes
.taskFactory);
202
public ElementLocation OverrideLocation => GetAttributeLocation(
XMakeAttributes
.overrideUsingTask);
238
XMakeAttributes
.assemblyFile,
239
XMakeAttributes
.assemblyName);
Construction\ProjectUsingTaskParameterElement.cs (9)
90
string typeAttribute = GetAttributeValue(
XMakeAttributes
.parameterType);
97
SetOrRemoveAttribute(
XMakeAttributes
.parameterType, value, "Set usingtaskparameter ParameterType {0}", value);
108
string outputAttribute = GetAttributeValue(
XMakeAttributes
.output);
114
SetOrRemoveAttribute(
XMakeAttributes
.output, value, "Set usingtaskparameter Output {0}", value);
125
string requiredAttribute = GetAttributeValue(
XMakeAttributes
.required);
131
SetOrRemoveAttribute(
XMakeAttributes
.required, value, "Set usingtaskparameter Required {0}", value);
146
public ElementLocation ParameterTypeLocation => GetAttributeLocation(
XMakeAttributes
.parameterType) ?? Location;
153
public ElementLocation OutputLocation => GetAttributeLocation(
XMakeAttributes
.output) ?? Location;
160
public ElementLocation RequiredLocation => GetAttributeLocation(
XMakeAttributes
.required) ?? Location;
Construction\Solution\ProjectInSolution.cs (2)
20
using XMakeAttributes = Microsoft.Build.Shared.
XMakeAttributes
;
340
XMakeAttributes
.defaultXmlNamespace,
Evaluation\Evaluator.cs (4)
2132
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValue", string.Empty,
XMakeAttributes
.project, XMakeElements.import);
2162
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", EscapingUtilities.UnescapeAll(importExpressionEscapedItem),
XMakeAttributes
.project, XMakeElements.import, ex.Message);
2207
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", importFileUnescaped,
XMakeAttributes
.project, XMakeElements.import, ex.Message);
2629
ProjectErrorUtilities.ThrowInvalidProject(importElement.Location, "InvalidAttributeValueWithException", importExpandedWithDefaultPath,
XMakeAttributes
.project, XMakeElements.import, ex.Message);
Evaluation\IntrinsicFunctions.cs (12)
480
if (!
XMakeAttributes
.IsValidMSBuildRuntimeValue(runtime))
482
ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", runtime, "Runtime",
XMakeAttributes
.MSBuildRuntimeValues.clr2,
XMakeAttributes
.MSBuildRuntimeValues.clr4,
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime,
XMakeAttributes
.MSBuildRuntimeValues.any);
485
if (!
XMakeAttributes
.IsValidMSBuildArchitectureValue(architecture))
487
ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", architecture, "Architecture",
XMakeAttributes
.MSBuildArchitectureValues.x86,
XMakeAttributes
.MSBuildArchitectureValues.x64,
XMakeAttributes
.MSBuildArchitectureValues.currentArchitecture,
XMakeAttributes
.MSBuildArchitectureValues.any);
490
runtime =
XMakeAttributes
.GetExplicitMSBuildRuntime(runtime);
491
architecture =
XMakeAttributes
.GetExplicitMSBuildArchitecture(architecture, runtime);
Evaluation\Preprocessor.cs (15)
244
string outerInitialTargets = destinationDocument.DocumentElement.GetAttribute(
XMakeAttributes
.initialTargets).Trim();
245
string innerInitialTargets = ((XmlElement)child).GetAttribute(
XMakeAttributes
.initialTargets).Trim();
254
destinationDocument.DocumentElement.SetAttribute(
XMakeAttributes
.initialTargets, outerInitialTargets + innerInitialTargets);
258
string outerDefaultTargets = destinationDocument.DocumentElement.GetAttribute(
XMakeAttributes
.defaultTargets).Trim();
262
string innerDefaultTargets = ((XmlElement)child).GetAttribute(
XMakeAttributes
.defaultTargets).Trim();
266
destinationDocument.DocumentElement.SetAttribute(
XMakeAttributes
.defaultTargets, innerDefaultTargets);
281
string importCondition = ((XmlElement)child).GetAttribute(
XMakeAttributes
.condition);
283
string importProject = ((XmlElement)child).GetAttribute(
XMakeAttributes
.project).Replace("--", "__");
284
string importSdk = ((XmlElement)child).GetAttribute(
XMakeAttributes
.sdk);
285
string sdk = importSdk.Length > 0 ? $" {
XMakeAttributes
.sdk}=\"{importSdk}\"" : String.Empty;
288
string projectSdk = source.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, source.Name, StringComparison.Ordinal) ? ((XmlElement)source).GetAttribute(
XMakeAttributes
.sdk) : String.Empty;
312
$"\r\n This import was added implicitly because the {XMakeElements.project} element's {
XMakeAttributes
.sdk} attribute specified \"{importSdk}\".";
339
string importGroupCondition = ((XmlElement)child).GetAttribute(
XMakeAttributes
.condition);
353
if (clone.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, child.Name, StringComparison.Ordinal) && clone.Attributes?[
XMakeAttributes
.sdk] != null)
355
clone.Attributes.Remove(clone.Attributes[
XMakeAttributes
.sdk]);
Evaluation\ProjectParser.cs (96)
32
private static readonly HashSet<string> ValidAttributesOnlyConditionAndLabel = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label };
37
private static readonly HashSet<string> KnownAttributesOnItem = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.include,
XMakeAttributes
.exclude,
XMakeAttributes
.remove,
XMakeAttributes
.keepMetadata,
XMakeAttributes
.removeMetadata,
XMakeAttributes
.keepDuplicates,
XMakeAttributes
.update,
XMakeAttributes
.matchOnMetadata,
XMakeAttributes
.matchOnMetadataOptions };
47
private static readonly HashSet<string> ValidAttributesOnImport = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.project,
XMakeAttributes
.sdk,
XMakeAttributes
.sdkVersion,
XMakeAttributes
.sdkMinimumVersion };
52
private static readonly HashSet<string> ValidAttributesOnUsingTask = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.taskName,
XMakeAttributes
.assemblyFile,
XMakeAttributes
.assemblyName,
XMakeAttributes
.taskFactory,
XMakeAttributes
.architecture,
XMakeAttributes
.runtime,
XMakeAttributes
.requiredPlatform,
XMakeAttributes
.requiredRuntime,
XMakeAttributes
.overrideUsingTask };
57
private static readonly HashSet<string> ValidAttributesOnTarget = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.name,
XMakeAttributes
.inputs,
XMakeAttributes
.outputs,
XMakeAttributes
.keepDuplicateOutputs,
XMakeAttributes
.dependsOnTargets,
XMakeAttributes
.beforeTargets,
XMakeAttributes
.afterTargets,
XMakeAttributes
.returns };
62
private static readonly HashSet<string> ValidAttributesOnOnError = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.executeTargets };
67
private static readonly HashSet<string> ValidAttributesOnOutput = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.taskParameter,
XMakeAttributes
.itemName,
XMakeAttributes
.propertyName };
72
private static readonly HashSet<string> ValidAttributesOnUsingTaskParameter = new HashSet<string> {
XMakeAttributes
.parameterType,
XMakeAttributes
.output,
XMakeAttributes
.required };
77
private static readonly HashSet<string> ValidAttributesOnUsingTaskBody = new HashSet<string> {
XMakeAttributes
.evaluate };
147
XMakeAttributes
.defaultXmlNamespace);
272
string include = element.GetAttribute(
XMakeAttributes
.include);
273
string exclude = element.GetAttribute(
XMakeAttributes
.exclude);
274
string remove = element.GetAttribute(
XMakeAttributes
.remove);
275
string update = element.GetAttribute(
XMakeAttributes
.update);
279
if (element.HasAttribute(
XMakeAttributes
.include))
282
exclusiveItemOperation =
XMakeAttributes
.include;
284
if (element.HasAttribute(
XMakeAttributes
.remove))
287
exclusiveItemOperation =
XMakeAttributes
.remove;
289
if (element.HasAttribute(
XMakeAttributes
.update))
292
exclusiveItemOperation =
XMakeAttributes
.update;
298
XmlAttributeWithLocation errorAttribute = remove.Length > 0 ? (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.remove] : (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.update];
306
ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(exclude.Length == 0 || include.Length > 0, (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.exclude]);
309
ProjectErrorUtilities.VerifyThrowInvalidProject(include.Length > 0 || element.Attributes[
XMakeAttributes
.include] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.include, itemType);
312
ProjectErrorUtilities.VerifyThrowInvalidProject(remove.Length > 0 || element.Attributes[
XMakeAttributes
.remove] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.remove, itemType);
315
ProjectErrorUtilities.VerifyThrowInvalidProject(update.Length > 0 || element.Attributes[
XMakeAttributes
.update] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.update, itemType);
475
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.project);
479
if (element.HasAttribute(
XMakeAttributes
.sdk))
482
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdk, nullIfNotExists: true),
483
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdkVersion, nullIfNotExists: true),
484
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdkMinimumVersion, nullIfNotExists: true));
529
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(
XMakeAttributes
.taskName).Length > 0, element.Location, "ProjectTaskNameEmpty");
531
string assemblyName = element.GetAttribute(
XMakeAttributes
.assemblyName);
532
string assemblyFile = element.GetAttribute(
XMakeAttributes
.assemblyFile);
539
XMakeAttributes
.assemblyName,
540
XMakeAttributes
.assemblyFile);
542
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element,
XMakeAttributes
.assemblyName);
543
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element,
XMakeAttributes
.assemblyFile);
597
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.name);
600
string targetName = EscapingUtilities.UnescapeAll(ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.name));
605
ProjectErrorUtilities.ThrowInvalidProject(element.GetAttributeLocation(
XMakeAttributes
.name), "NameInvalid", targetName, targetName[indexOfSpecialCharacter]);
639
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(childElement,
XMakeAttributes
.executeTargets);
678
!
XMakeAttributes
.IsBadlyCasedSpecialTaskAttribute(attribute.Name),
714
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.taskParameter);
717
XmlAttributeWithLocation itemNameAttribute = element.GetAttributeWithLocation(
XMakeAttributes
.itemName);
718
XmlAttributeWithLocation propertyNameAttribute = element.GetAttributeWithLocation(
XMakeAttributes
.propertyName);
726
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, itemNameAttribute,
XMakeAttributes
.itemName);
727
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, propertyNameAttribute,
XMakeAttributes
.propertyName);
857
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.condition);
941
if (string.IsNullOrEmpty(element.GetAttribute(
XMakeAttributes
.sdkName)))
Instance\TaskFactories\AssemblyTaskFactory.cs (26)
432
??
XMakeAttributes
.GetCurrentMSBuildRuntime();
437
??
XMakeAttributes
.GetCurrentMSBuildArchitecture();
516
if (!
XMakeAttributes
.IsValidMSBuildRuntimeValue(identityParameters.Runtime))
524
XMakeAttributes
.MSBuildRuntimeValues.clr2,
525
XMakeAttributes
.MSBuildRuntimeValues.clr4,
526
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime,
527
XMakeAttributes
.MSBuildRuntimeValues.any);
533
if (!
XMakeAttributes
.IsValidMSBuildArchitectureValue(identityParameters.Architecture))
541
XMakeAttributes
.MSBuildArchitectureValues.x86,
542
XMakeAttributes
.MSBuildArchitectureValues.x64,
543
XMakeAttributes
.MSBuildArchitectureValues.currentArchitecture,
544
XMakeAttributes
.MSBuildArchitectureValues.any);
561
if (
XMakeAttributes
.RuntimeValuesMatch(taskIdentityParameters.Runtime, factoryIdentityParameters.Runtime))
563
if (
XMakeAttributes
.ArchitectureValuesMatch(taskIdentityParameters.Architecture, factoryIdentityParameters.Architecture))
589
string normalizedRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(factoryIdentityParameters.Runtime);
590
string normalizedArch =
XMakeAttributes
.GetExplicitMSBuildArchitecture(factoryIdentityParameters.Architecture, normalizedRuntime);
599
string normalizedRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(taskIdentityParameters.Runtime);
600
string normalizedArch =
XMakeAttributes
.GetExplicitMSBuildArchitecture(taskIdentityParameters.Architecture, normalizedRuntime);
607
if (!
XMakeAttributes
.TryMergeRuntimeValues(taskIdentityParameters.Runtime, factoryIdentityParameters.Runtime, out var mergedRuntime))
612
if (!
XMakeAttributes
.TryMergeArchitectureValues(taskIdentityParameters.Architecture, factoryIdentityParameters.Architecture, out var mergedArchitecture))
632
!currentParams.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.net, StringComparison.OrdinalIgnoreCase))
678
string currentRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime);
680
if (!currentRuntime.Equals(
XMakeAttributes
.GetExplicitMSBuildRuntime(mergedParameters.Runtime), StringComparison.OrdinalIgnoreCase))
689
string currentArchitecture =
XMakeAttributes
.GetCurrentMSBuildArchitecture();
691
if (!currentArchitecture.Equals(
XMakeAttributes
.GetExplicitMSBuildArchitecture(mergedParameters.Architecture), StringComparison.OrdinalIgnoreCase))
Instance\TaskRegistry.cs (15)
316
XMakeAttributes
.name,
341
XMakeAttributes
.assemblyFile,
350
XMakeAttributes
.assemblyName,
411
ProjectErrorUtilities.ThrowInvalidProject(projectUsingTaskXml.Location, "InvalidAttributeValueWithException", assemblyFile,
XMakeAttributes
.assemblyFile, XMakeElements.usingTask, ex.Message);
430
runtime == string.Empty ?
XMakeAttributes
.MSBuildRuntimeValues.any : runtime,
431
architecture == string.Empty ?
XMakeAttributes
.MSBuildArchitectureValues.any : architecture);
963
if (!
XMakeAttributes
.RuntimeValuesMatch(runtimeX, runtimeY))
968
if (!
XMakeAttributes
.ArchitectureValuesMatch(architectureX, architectureY))
1537
XMakeAttributes
.runtime,
1538
XMakeAttributes
.architecture,
1718
XMakeAttributes
.evaluate,
1783
XMakeAttributes
.parameterType,
1808
XMakeAttributes
.parameterType,
1821
XMakeAttributes
.output,
1847
XMakeAttributes
.required,
src\msbuild\src\Shared\TypeLoader.cs (1)
16
using static Microsoft.Build.Shared.
XMakeAttributes
;
Utilities\EngineFileUtilities.cs (12)
409
XMakeAttributes
.exclude,
422
XMakeAttributes
.include,
438
XMakeAttributes
.include,
451
XMakeAttributes
.project,
460
XMakeAttributes
.include,
469
XMakeAttributes
.exclude,
487
XMakeAttributes
.include,
502
XMakeAttributes
.exclude,
514
XMakeAttributes
.include,
527
XMakeAttributes
.project,
537
XMakeAttributes
.include,
547
XMakeAttributes
.exclude,
Xml\ProjectXmlUtilities.cs (1)
87
else if (string.Equals(element.NamespaceURI,
XMakeAttributes
.defaultXmlNamespace, StringComparison.OrdinalIgnoreCase))
Microsoft.Build.Framework (7)
BackEnd\CommunicationsUtilities.cs (7)
585
architectureFlagToSet =
XMakeAttributes
.GetCurrentMSBuildArchitecture();
592
if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.clr2, StringComparison.OrdinalIgnoreCase))
596
else if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.clr4, StringComparison.OrdinalIgnoreCase))
600
else if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.net, StringComparison.OrdinalIgnoreCase))
623
XMakeAttributes
.MSBuildRuntimeValues.net.Equals(taskHostParameters.Runtime, StringComparison.OrdinalIgnoreCase);
627
if (architectureFlagToSet!.Equals(
XMakeAttributes
.MSBuildArchitectureValues.x64, StringComparison.OrdinalIgnoreCase))
631
else if (architectureFlagToSet.Equals(
XMakeAttributes
.MSBuildArchitectureValues.arm64, StringComparison.OrdinalIgnoreCase))
Microsoft.Build.Tasks.Core (4)
AddToWin32Manifest.cs (2)
230
if (string.IsNullOrEmpty(winSettingsNode.GetAttribute(
XMakeAttributes
.xmlns)))
232
winSettingsNode.SetAttribute(
XMakeAttributes
.xmlns, WindowsSettingsNamespace);
CreateItem.cs (2)
64
(Include, bool expandedInclude) = TryExpandWildcards(Include,
XMakeAttributes
.include);
65
(Exclude, bool expandedExclude) = TryExpandWildcards(Exclude,
XMakeAttributes
.exclude);
MSBuild (1)
src\msbuild\src\Shared\TypeLoader.cs (1)
16
using static Microsoft.Build.Shared.
XMakeAttributes
;