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)
136
ProjectErrorUtilities.VerifyThrowInvalidProject(element.Name != XMakeElements.visualStudioProject, element.
Location
, "ProjectUpgradeNeeded", _project.FullPath);
137
ProjectErrorUtilities.VerifyThrowInvalidProject(element.LocalName == XMakeElements.project, element.
Location
, "UnrecognizedElement", element.Name);
142
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "ProjectMustBeInMSBuildXmlNamespace",
203
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "ErrorWarningMessageNotSupported", childElement.Name);
207
ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, childElement.ParentNode.Name, childElement.
Location
);
226
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(childElement.Name) && !ReservedPropertyNames.IsReservedProperty(childElement.Name), childElement.
Location
, "CannotModifyReservedProperty", childElement.Name);
295
ProjectErrorUtilities.VerifyThrowInvalidProject(exclusiveAttributeCount == 1 || belowTarget, element.
Location
, "IncludeRemoveOrUpdate", exclusiveItemOperation, itemType);
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);
310
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(itemType), element.
Location
, "CannotModifyReservedItem", itemType);
399
ProjectErrorUtilities.VerifyThrowInvalidProject(!(parent is ProjectItemElement) || ((ProjectItemElement)parent).Remove.Length == 0, element.
Location
, "ChildElementsBelowRemoveNotAllowed", element.Name);
400
ProjectErrorUtilities.VerifyThrowInvalidProject(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(element.Name), element.
Location
, "ItemSpecModifierCannotBeCustomMetadata", element.Name);
401
ProjectErrorUtilities.VerifyThrowInvalidProject(!XMakeElements.ReservedItemNames.Contains(element.Name), element.
Location
, "CannotModifyReservedItemMetadata", element.Name);
409
ProjectErrorUtilities.VerifyThrowInvalidProject(!containsItemVector, element.
Location
, "MetadataDefinitionCannotContainItemVectorExpression", metadatum.Value, metadatum.Name);
431
childElement.
Location
,
451
element.
Location
,
511
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(XMakeAttributes.taskName).Length > 0, element.
Location
, "ProjectTaskNameEmpty");
518
element.
Location
,
559
ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
);
624
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "ItemDefinitionGroupNotLegalInsideTarget", childElement.Name);
635
ProjectErrorUtilities.ThrowInvalidProject(childElement.
Location
, "PropertyOutsidePropertyGroupInTarget", childElement.Name, childElement.ParentNode.Name);
668
ProjectErrorUtilities.VerifyThrowInvalidProject(childElement.Name == XMakeElements.output, childElement.
Location
, "UnrecognizedChildElement", childElement.Name, task.Name);
692
element.
Location
,
699
ProjectErrorUtilities.VerifyThrowInvalidProject(String.IsNullOrWhiteSpace(propertyNameAttribute?.Value) || !ReservedPropertyNames.IsReservedProperty(propertyNameAttribute.Value), element.
Location
, "CannotModifyReservedProperty", propertyNameAttribute?.Value);
776
ProjectErrorUtilities.VerifyThrowInvalidProject(nestingDepth <= MaximumChooseNesting, element.
Location
, "ChooseOverflow", MaximumChooseNesting);
788
ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.
Location
, "WhenNotAllowedAfterOtherwise");
794
ProjectErrorUtilities.VerifyThrowInvalidProject(!foundOtherwise, childElement.
Location
, "MultipleOtherwise");
800
ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
);
807
ProjectErrorUtilities.VerifyThrowInvalidProject(foundWhen, element.
Location
, "ChooseMustContainWhen");
868
ProjectXmlUtilities.ThrowProjectInvalidChildElement(childElement.Name, element.Name, element.
Location
);
885
ProjectErrorUtilities.VerifyThrowInvalidProject(!_seenProjectExtensions, element.
Location
, "DuplicateProjectExtensions");
899
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "InvalidSdkElementName", element.Name);
Xml\ProjectXmlUtilities.cs (5)
63
ThrowProjectInvalidChildElement(child.Name, element.Name, element.
Location
);
73
ProjectErrorUtilities.ThrowInvalidProject(child.
Location
, "InvalidChildElementDueToDuplication", child.Name, child.ParentNode.Name);
101
if (Path.GetExtension(element.
Location
.File).Equals(".dwproj", StringComparison.OrdinalIgnoreCase))
109
throw new UnbuildableProjectTypeException(element.
Location
.File);
177
ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(attributeName).Length > 0, element.
Location
, "MissingRequiredAttribute", attributeName, element.Name);
Xml\ProjectXmlUtilities.XmlElementChildIterator.cs (1)
100
ThrowProjectInvalidChildElement(child.Name, _element.Name, _element.
Location
);
XmlUtilities.cs (2)
36
(XmlElementWithLocation)((XmlDocumentWithLocation)oldElement.OwnerDocument).CreateElement(newElementName, xmlNamespace ?? string.Empty, oldElement.
Location
);
114
ProjectErrorUtilities.ThrowInvalidProject(element.
Location
, "NameInvalid", name, name[firstInvalidCharLocation]);