46 references to Location
Microsoft.Build (46)
Construction\ProjectElement.cs (1)
294
public ElementLocation Location => Link != null ? Link.Location : XmlElement.
Location
;
Construction\ProjectElementContainer.cs (1)
503
XmlElement.
Location
, "InvalidChildElementDueToDuplication", child.XmlElement.Name, ElementName);
ElementLocation\XmlElementWithLocation.cs (3)
66
{ return
Location
.Line; }
77
{ return
Location
.Column; }
112
return
Location
.Line != 0;
Evaluation\ProjectParser.cs (33)
140
ProjectErrorUtilities.VerifyThrowInvalidProject(element.Name != XMakeElements.visualStudioProject, element.
Location
, "ProjectUpgradeNeeded", _project.FullPath);
141
ProjectErrorUtilities.VerifyThrowInvalidProject(element.LocalName == XMakeElements.project, element.
Location
, "UnrecognizedElement", element.Name);
146
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "ProjectMustBeInMSBuildXmlNamespace",
207
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "ErrorWarningMessageNotSupported", childElement.Name);
211
if (ProjectXmlUtilities.ThrowIfProjectInvalidChildElement(childElement.Name, childElement.ParentNode.Name, childElement.
Location
, _ParserIgnoreConfiguration))
234
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(childElement.Name) && !ReservedPropertyNames.IsReservedProperty(childElement.Name), childElement.
Location
, "CannotModifyReservedProperty", childElement.Name);
303
ProjectErrorUtilities.VerifyThrowInvalidProject(exclusiveAttributeCount == 1 || belowTarget, element.
Location
, "IncludeRemoveOrUpdate", exclusiveItemOperation, itemType);
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);
318
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(itemType), element.
Location
, "CannotModifyReservedItem", itemType);
410
ProjectErrorUtilities.VerifyThrowInvalidProject(!(parent is ProjectItemElement) || ((ProjectItemElement)parent).Remove.Length == 0, element.
Location
, "ChildElementsBelowRemoveNotAllowed", element.Name);
411
ProjectErrorUtilities.VerifyThrowInvalidProject(!ItemSpecModifiers.IsItemSpecModifier(element.Name), element.
Location
, "ItemSpecModifierCannotBeCustomMetadata", element.Name);
412
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(element.Name), element.
Location
, "CannotModifyReservedItemMetadata", element.Name);
420
ProjectErrorUtilities.VerifyThrowInvalidProject(!containsItemVector, element.
Location
, "MetadataDefinitionCannotContainItemVectorExpression", metadatum.Value, metadatum.Name);
448
childElement.
Location
,
469
element.
Location
,
529
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(XMakeAttributes.taskName).Length > 0, element.
Location
, "ProjectTaskNameEmpty");
536
element.
Location
,
577
if (ProjectXmlUtilities.ThrowIfProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
, _ParserIgnoreConfiguration))
646
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "ItemDefinitionGroupNotLegalInsideTarget", childElement.Name);
657
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "PropertyOutsidePropertyGroupInTarget", childElement.Name, childElement.ParentNode.Name);
697
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "UnrecognizedChildElement", childElement.Name, task.Name);
722
element.
Location
,
729
ProjectErrorUtilities.VerifyThrowInvalidProject(String.IsNullOrWhiteSpace(propertyNameAttribute?.Value) || !ReservedPropertyNames.IsReservedProperty(propertyNameAttribute.Value), element.
Location
, "CannotModifyReservedProperty", propertyNameAttribute?.Value);
812
ProjectErrorUtilities.VerifyThrowInvalidProject(nestingDepth <= MaximumChooseNesting, element.
Location
, "ChooseOverflow", MaximumChooseNesting);
824
ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.
Location
, "WhenNotAllowedAfterOtherwise");
830
ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.
Location
, "MultipleOtherwise");
836
if (ProjectXmlUtilities.ThrowIfProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
, _ParserIgnoreConfiguration))
847
ProjectErrorUtilities.VerifyThrowInvalidProject(foundWhen, element.
Location
, "ChooseMustContainWhen");
908
if (ProjectXmlUtilities.ThrowIfProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
, _ParserIgnoreConfiguration))
929
ProjectErrorUtilities.VerifyThrowInvalidProject(!_seenProjectExtensions, element.
Location
, "DuplicateProjectExtensions");
943
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "InvalidSdkElementName", element.Name);
Utilities\XmlUtilities.cs (2)
36
(XmlElementWithLocation)((XmlDocumentWithLocation)oldElement.OwnerDocument).CreateElement(newElementName, xmlNamespace ?? string.Empty, oldElement.
Location
);
114
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "NameInvalid", name, name[firstInvalidCharLocation]);
Xml\ProjectXmlUtilities.cs (5)
63
ThrowIfProjectInvalidChildElement(child.Name, element.Name, element.
Location
, config);
73
ProjectErrorUtilities.ThrowInvalidProject(child.
Location
, "InvalidChildElementDueToDuplication", child.Name, child.ParentNode.Name);
93
if (Path.GetExtension(element.
Location
.File).Equals(".dwproj", StringComparison.OrdinalIgnoreCase))
101
throw new UnbuildableProjectTypeException(element.
Location
.File);
174
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(attributeName).Length > 0, element.
Location
, "MissingRequiredAttribute", attributeName, element.Name);
Xml\ProjectXmlUtilities.XmlElementChildIterator.cs (1)
100
ThrowIfProjectInvalidChildElement(child.Name, _element.Name, _element.
Location
, config: null);