406 references to XMakeAttributes
Microsoft.Build (395)
BackEnd\Client\MSBuildClient.cs (1)
541
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)
564
msbuildArchitecture = msbuildArchitecture == string.Empty ?
XMakeAttributes
.MSBuildArchitectureValues.any : msbuildArchitecture.Trim();
565
msbuildRuntime = msbuildRuntime == string.Empty ?
XMakeAttributes
.MSBuildRuntimeValues.any : msbuildRuntime.Trim();
720
if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.errorAndContinue, expandedValue, StringComparison.OrdinalIgnoreCase))
724
else if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.warnAndContinue, expandedValue, StringComparison.OrdinalIgnoreCase))
728
else if (String.Equals(
XMakeAttributes
.ContinueOnErrorValues.errorAndStop, expandedValue, StringComparison.OrdinalIgnoreCase))
1145
XMakeAttributes
.itemName,
1163
XMakeAttributes
.propertyName,
1176
XMakeAttributes
.taskParameter,
BackEnd\Node\OutOfProcServerNode.cs (1)
97
CommunicationsUtilities.GetHandshakeOptions(taskHost: false, taskHostParameters: TaskHostParameters.Empty, architectureFlagToSet:
XMakeAttributes
.GetCurrentMSBuildArchitecture()));
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
954
returnClass.FactoryIdentityParameters.Runtime ??
XMakeAttributes
.MSBuildRuntimeValues.any,
955
returnClass.FactoryIdentityParameters.Architecture ??
XMakeAttributes
.MSBuildArchitectureValues.any,
956
taskIdentityParameters.Runtime ??
XMakeAttributes
.MSBuildRuntimeValues.any,
957
taskIdentityParameters.Architecture ??
XMakeAttributes
.MSBuildArchitectureValues.any);
1823
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)
499
get => GetAttributeValue(
XMakeAttributes
.defaultTargets);
502
set => SetOrRemoveAttribute(
XMakeAttributes
.defaultTargets, value, "Set Project DefaultTargets to '{0}'", value);
512
get => GetAttributeValue(
XMakeAttributes
.initialTargets);
515
set => SetOrRemoveAttribute(
XMakeAttributes
.initialTargets, value, "Set project InitialTargets to '{0}'", value);
527
get => GetAttributeValue(
XMakeAttributes
.sdk);
530
set => SetOrRemoveAttribute(
XMakeAttributes
.sdk, value, "Set project Sdk to '{0}'", value);
540
get => GetAttributeValue(
XMakeAttributes
.treatAsLocalProperty);
543
set => SetOrRemoveAttribute(
XMakeAttributes
.treatAsLocalProperty, value, "Set project TreatAsLocalProperty to '{0}'", value);
553
get => GetAttributeValue(
XMakeAttributes
.toolsVersion);
556
set => SetOrRemoveAttribute(
XMakeAttributes
.toolsVersion, value, "Set project ToolsVersion {0}", value);
659
public ElementLocation ToolsVersionLocation => GetAttributeLocation(
XMakeAttributes
.toolsVersion);
664
public ElementLocation DefaultTargetsLocation => GetAttributeLocation(
XMakeAttributes
.defaultTargets);
669
public ElementLocation InitialTargetsLocation => GetAttributeLocation(
XMakeAttributes
.initialTargets);
674
public ElementLocation SdkLocation => GetAttributeLocation(
XMakeAttributes
.sdk);
679
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)
2053
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValue", string.Empty,
XMakeAttributes
.project, XMakeElements.import);
2083
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", EscapingUtilities.UnescapeAll(importExpressionEscapedItem),
XMakeAttributes
.project, XMakeElements.import, ex.Message);
2128
ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", importFileUnescaped,
XMakeAttributes
.project, XMakeElements.import, ex.Message);
2545
ProjectErrorUtilities.ThrowInvalidProject(importElement.Location, "InvalidAttributeValueWithException", importExpandedWithDefaultPath,
XMakeAttributes
.project, XMakeElements.import, ex.Message);
Evaluation\IntrinsicFunctions.cs (12)
492
if (!
XMakeAttributes
.IsValidMSBuildRuntimeValue(runtime))
494
ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", runtime, "Runtime",
XMakeAttributes
.MSBuildRuntimeValues.clr2,
XMakeAttributes
.MSBuildRuntimeValues.clr4,
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime,
XMakeAttributes
.MSBuildRuntimeValues.any);
497
if (!
XMakeAttributes
.IsValidMSBuildArchitectureValue(architecture))
499
ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", architecture, "Architecture",
XMakeAttributes
.MSBuildArchitectureValues.x86,
XMakeAttributes
.MSBuildArchitectureValues.x64,
XMakeAttributes
.MSBuildArchitectureValues.currentArchitecture,
XMakeAttributes
.MSBuildArchitectureValues.any);
502
runtime =
XMakeAttributes
.GetExplicitMSBuildRuntime(runtime);
503
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)
31
private static readonly HashSet<string> ValidAttributesOnlyConditionAndLabel = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label };
36
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 };
46
private static readonly HashSet<string> ValidAttributesOnImport = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.project,
XMakeAttributes
.sdk,
XMakeAttributes
.sdkVersion,
XMakeAttributes
.sdkMinimumVersion };
51
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 };
56
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 };
61
private static readonly HashSet<string> ValidAttributesOnOnError = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.executeTargets };
66
private static readonly HashSet<string> ValidAttributesOnOutput = new HashSet<string> {
XMakeAttributes
.condition,
XMakeAttributes
.label,
XMakeAttributes
.taskParameter,
XMakeAttributes
.itemName,
XMakeAttributes
.propertyName };
71
private static readonly HashSet<string> ValidAttributesOnUsingTaskParameter = new HashSet<string> {
XMakeAttributes
.parameterType,
XMakeAttributes
.output,
XMakeAttributes
.required };
76
private static readonly HashSet<string> ValidAttributesOnUsingTaskBody = new HashSet<string> {
XMakeAttributes
.evaluate };
143
XMakeAttributes
.defaultXmlNamespace);
264
string include = element.GetAttribute(
XMakeAttributes
.include);
265
string exclude = element.GetAttribute(
XMakeAttributes
.exclude);
266
string remove = element.GetAttribute(
XMakeAttributes
.remove);
267
string update = element.GetAttribute(
XMakeAttributes
.update);
271
if (element.HasAttribute(
XMakeAttributes
.include))
274
exclusiveItemOperation =
XMakeAttributes
.include;
276
if (element.HasAttribute(
XMakeAttributes
.remove))
279
exclusiveItemOperation =
XMakeAttributes
.remove;
281
if (element.HasAttribute(
XMakeAttributes
.update))
284
exclusiveItemOperation =
XMakeAttributes
.update;
290
XmlAttributeWithLocation errorAttribute = remove.Length > 0 ? (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.remove] : (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.update];
298
ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(exclude.Length == 0 || include.Length > 0, (XmlAttributeWithLocation)element.Attributes[
XMakeAttributes
.exclude]);
301
ProjectErrorUtilities.VerifyThrowInvalidProject(include.Length > 0 || element.Attributes[
XMakeAttributes
.include] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.include, itemType);
304
ProjectErrorUtilities.VerifyThrowInvalidProject(remove.Length > 0 || element.Attributes[
XMakeAttributes
.remove] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.remove, itemType);
307
ProjectErrorUtilities.VerifyThrowInvalidProject(update.Length > 0 || element.Attributes[
XMakeAttributes
.update] == null, element.Location, "MissingRequiredAttribute",
XMakeAttributes
.update, itemType);
457
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.project);
461
if (element.HasAttribute(
XMakeAttributes
.sdk))
464
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdk, nullIfNotExists: true),
465
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdkVersion, nullIfNotExists: true),
466
ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.sdkMinimumVersion, nullIfNotExists: true));
511
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(
XMakeAttributes
.taskName).Length > 0, element.Location, "ProjectTaskNameEmpty");
513
string assemblyName = element.GetAttribute(
XMakeAttributes
.assemblyName);
514
string assemblyFile = element.GetAttribute(
XMakeAttributes
.assemblyFile);
521
XMakeAttributes
.assemblyName,
522
XMakeAttributes
.assemblyFile);
524
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element,
XMakeAttributes
.assemblyName);
525
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element,
XMakeAttributes
.assemblyFile);
575
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.name);
578
string targetName = EscapingUtilities.UnescapeAll(ProjectXmlUtilities.GetAttributeValue(element,
XMakeAttributes
.name));
583
ProjectErrorUtilities.ThrowInvalidProject(element.GetAttributeLocation(
XMakeAttributes
.name), "NameInvalid", targetName, targetName[indexOfSpecialCharacter]);
617
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(childElement,
XMakeAttributes
.executeTargets);
656
!
XMakeAttributes
.IsBadlyCasedSpecialTaskAttribute(attribute.Name),
684
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.taskParameter);
687
XmlAttributeWithLocation itemNameAttribute = element.GetAttributeWithLocation(
XMakeAttributes
.itemName);
688
XmlAttributeWithLocation propertyNameAttribute = element.GetAttributeWithLocation(
XMakeAttributes
.propertyName);
696
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, itemNameAttribute,
XMakeAttributes
.itemName);
697
ProjectXmlUtilities.VerifyThrowProjectAttributeEitherMissingOrNotEmpty(element, propertyNameAttribute,
XMakeAttributes
.propertyName);
817
ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element,
XMakeAttributes
.condition);
897
if (string.IsNullOrEmpty(element.GetAttribute(
XMakeAttributes
.sdkName)))
Instance\TaskFactories\AssemblyTaskFactory.cs (26)
443
??
XMakeAttributes
.GetCurrentMSBuildRuntime();
448
??
XMakeAttributes
.GetCurrentMSBuildArchitecture();
526
if (!
XMakeAttributes
.IsValidMSBuildRuntimeValue(identityParameters.Runtime))
534
XMakeAttributes
.MSBuildRuntimeValues.clr2,
535
XMakeAttributes
.MSBuildRuntimeValues.clr4,
536
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime,
537
XMakeAttributes
.MSBuildRuntimeValues.any);
543
if (!
XMakeAttributes
.IsValidMSBuildArchitectureValue(identityParameters.Architecture))
551
XMakeAttributes
.MSBuildArchitectureValues.x86,
552
XMakeAttributes
.MSBuildArchitectureValues.x64,
553
XMakeAttributes
.MSBuildArchitectureValues.currentArchitecture,
554
XMakeAttributes
.MSBuildArchitectureValues.any);
571
if (
XMakeAttributes
.RuntimeValuesMatch(taskIdentityParameters.Runtime, factoryIdentityParameters.Runtime))
573
if (
XMakeAttributes
.ArchitectureValuesMatch(taskIdentityParameters.Architecture, factoryIdentityParameters.Architecture))
599
string normalizedRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(factoryIdentityParameters.Runtime);
600
string normalizedArch =
XMakeAttributes
.GetExplicitMSBuildArchitecture(factoryIdentityParameters.Architecture, normalizedRuntime);
609
string normalizedRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(taskIdentityParameters.Runtime);
610
string normalizedArch =
XMakeAttributes
.GetExplicitMSBuildArchitecture(taskIdentityParameters.Architecture, normalizedRuntime);
617
if (!
XMakeAttributes
.TryMergeRuntimeValues(taskIdentityParameters.Runtime, factoryIdentityParameters.Runtime, out var mergedRuntime))
622
if (!
XMakeAttributes
.TryMergeArchitectureValues(taskIdentityParameters.Architecture, factoryIdentityParameters.Architecture, out var mergedArchitecture))
642
!currentParams.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.net, StringComparison.OrdinalIgnoreCase))
688
string currentRuntime =
XMakeAttributes
.GetExplicitMSBuildRuntime(
XMakeAttributes
.MSBuildRuntimeValues.currentRuntime);
690
if (!currentRuntime.Equals(
XMakeAttributes
.GetExplicitMSBuildRuntime(mergedParameters.Runtime), StringComparison.OrdinalIgnoreCase))
699
string currentArchitecture =
XMakeAttributes
.GetCurrentMSBuildArchitecture();
701
if (!currentArchitecture.Equals(
XMakeAttributes
.GetExplicitMSBuildArchitecture(mergedParameters.Architecture), StringComparison.OrdinalIgnoreCase))
Instance\TaskRegistry.cs (15)
315
XMakeAttributes
.name,
340
XMakeAttributes
.assemblyFile,
349
XMakeAttributes
.assemblyName,
410
ProjectErrorUtilities.ThrowInvalidProject(projectUsingTaskXml.Location, "InvalidAttributeValueWithException", assemblyFile,
XMakeAttributes
.assemblyFile, XMakeElements.usingTask, ex.Message);
429
runtime == string.Empty ?
XMakeAttributes
.MSBuildRuntimeValues.any : runtime,
430
architecture == string.Empty ?
XMakeAttributes
.MSBuildArchitectureValues.any : architecture);
969
if (!
XMakeAttributes
.RuntimeValuesMatch(runtimeX, runtimeY))
974
if (!
XMakeAttributes
.ArchitectureValuesMatch(architectureX, architectureY))
1545
XMakeAttributes
.runtime,
1546
XMakeAttributes
.architecture,
1712
XMakeAttributes
.evaluate,
1753
XMakeAttributes
.parameterType,
1778
XMakeAttributes
.parameterType,
1791
XMakeAttributes
.output,
1817
XMakeAttributes
.required,
src\msbuild\src\Shared\TypeLoader.cs (1)
15
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)
94
else if (string.Equals(element.NamespaceURI,
XMakeAttributes
.defaultXmlNamespace, StringComparison.OrdinalIgnoreCase))
Microsoft.Build.Framework (6)
BackEnd\CommunicationsUtilities.cs (6)
555
architectureFlagToSet =
XMakeAttributes
.GetCurrentMSBuildArchitecture();
562
if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.clr2, StringComparison.OrdinalIgnoreCase))
566
else if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.clr4, StringComparison.OrdinalIgnoreCase))
570
else if (taskHostParameters.Runtime.Equals(
XMakeAttributes
.MSBuildRuntimeValues.net, StringComparison.OrdinalIgnoreCase))
585
if (architectureFlagToSet!.Equals(
XMakeAttributes
.MSBuildArchitectureValues.x64, StringComparison.OrdinalIgnoreCase))
589
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)
15
using static Microsoft.Build.Shared.
XMakeAttributes
;