92 references to Location
Microsoft.Build (77)
Construction\ProjectChooseElement.cs (1)
119ProjectErrorUtilities.VerifyThrowInvalidProject(nestingDepth <= ProjectParser.MaximumChooseNesting, immediateParent.Location, "ChooseOverflow", ProjectParser.MaximumChooseNesting);
Construction\ProjectItemDefinitionElement.cs (1)
80ProjectMetadataElement.ValidateValidMetadataAsAttributeName(name, ElementName, Location);
Construction\ProjectItemElement.cs (1)
397ProjectMetadataElement.ValidateValidMetadataAsAttributeName(name, ElementName, Location);
Construction\ProjectMetadataElement.cs (2)
70ValidateValidMetadataAsAttributeName(Name, Parent?.ElementName ?? "null", Parent?.Location); 134ValidateValidMetadataAsAttributeName(newName, Parent.ElementName, Parent.Location);
Construction\ProjectUsingTaskBodyElement.cs (1)
121public ElementLocation EvaluateLocation => GetAttributeLocation(XMakeAttributes.evaluate) ?? Location;
Construction\ProjectUsingTaskParameterElement.cs (3)
152public ElementLocation ParameterTypeLocation => GetAttributeLocation(XMakeAttributes.parameterType) ?? Location; 159public ElementLocation OutputLocation => GetAttributeLocation(XMakeAttributes.output) ?? Location; 166public ElementLocation RequiredLocation => GetAttributeLocation(XMakeAttributes.required) ?? Location;
Definition\Project.cs (5)
1677ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 1809ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File); 2951property.UpdateEvaluatedValue(ExpandPropertyValueBestEffortLeaveEscaped(unevaluatedValue, property.Xml.Location)); 3398ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 3585ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
Definition\ProjectItem.cs (1)
606string evaluatedValueEscaped = _project.ExpandMetadataValueBestEffortLeaveEscaped(this, unevaluatedValue, metadatumXml.Location);
Definition\ProjectItemDefinition.cs (1)
179string evaluatedValueEscaped = _project.ExpandMetadataValueBestEffortLeaveEscaped(this, unevaluatedValue, metadatumXml.Location);
Definition\ProjectMetadata.cs (1)
225get { return _xml.Location; }
Definition\ProjectProperty.cs (1)
409_evaluatedValueEscaped = _project.ExpandPropertyValueBestEffortLeaveEscaped(value, _xml.Location);
Definition\Toolset.cs (1)
1093elementXml.Location,
Evaluation\Evaluator.cs (43)
444output.Location, 457output.Location, 480ProjectPropertyGroupTaskPropertyInstance property = new ProjectPropertyGroupTaskPropertyInstance(propertyElement.Name, propertyElement.Value, propertyElement.Condition, propertyElement.Location, propertyElement.ConditionLocation); 484ProjectPropertyGroupTaskInstance propertyGroup = new ProjectPropertyGroupTaskInstance(propertyGroupElement.Condition, propertyGroupElement.Location, propertyGroupElement.ConditionLocation, properties); 495ProjectOnErrorInstance onError = new ProjectOnErrorInstance(projectOnErrorElement.ExecuteTargetsAttribute, projectOnErrorElement.Condition, projectOnErrorElement.Location, projectOnErrorElement.ExecuteTargetsLocation, projectOnErrorElement.ConditionLocation); 518metadataElement.Location, 533itemElement.Location, 546ProjectItemGroupTaskInstance itemGroup = new ProjectItemGroupTaskInstance(itemGroupElement.Condition, itemGroupElement.Location, itemGroupElement.ConditionLocation, items); 601targetElement.Location, 880XmlUtilities.VerifyThrowProjectValidElementName(propertyName, currentProjectOrImport.Location); 1047_evaluationLoggingContext.LogComment(MessageImportance.Low, "OverridingTarget", otherTarget.Name, otherTarget.Location.File, targetName, targetElement.Location.File); 1316string evaluatedValue = _expander.ExpandIntoStringLeaveEscaped(propertyElement.Value, ExpanderOptions.ExpandProperties, propertyElement.Location); 1374string evaluatedValue = _expander.ExpandIntoStringLeaveEscaped(metadataElement.Value, ExpanderOptions.ExpandPropertiesAndCustomMetadata, itemDefinitionElement.Location); 1708importElement.Location.Line, 1709importElement.Location.Column, 1713importElement.Location.Line, 1714importElement.Location.Column, 1805sdkResult = _sdkResolverService.ResolveSdk(_submissionId, sdkReference, _evaluationLoggingContext, importElement.Location, solutionPath, projectPath, _interactive, _isRunningInVisualStudio, 1820importElement.Location.Line, 1821importElement.Location.Column, 1988ElementLocation importLocationInProject = importElement.Location; 1996importElement.Location.Line, 1997importElement.Location.Column, 2001importElement.Location.Line, 2002importElement.Location.Column) 2057importElement.Location.Line, 2058importElement.Location.Column, 2062importElement.Location.Line, 2063importElement.Location.Column) 2142_evaluationLoggingContext.LogWarning(null, new BuildEventFileInfo(importLocationInProject), "DuplicateImport", importFileUnescaped, previouslyImportedAt.Location.LocationString, parenthesizedProjectLocation); 2198importElement.Location.Line, 2199importElement.Location.Column, 2203importElement.Location.Line, 2204importElement.Location.Column) 2229importElement.Location.Line, 2230importElement.Location.Column, 2234importElement.Location.Line, 2235importElement.Location.Column) 2284importElement.Location.Line, 2285importElement.Location.Column, 2289importElement.Location.Line, 2290importElement.Location.Column) 2508ProjectErrorUtilities.ThrowInvalidProject(importElement.Location, "InvalidAttributeValueWithException", importExpandedWithDefaultPath, XMakeAttributes.project, XMakeElements.import, ex.Message);
Evaluation\LazyItemEvaluator.cs (1)
642metadatumElement.Location);
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (2)
213string evaluatedValue = _expander.ExpandIntoStringLeaveEscaped(metadataElement.Value, metadataExpansionOptions, metadataElement.Location); 251string evaluatedValue = _expander.ExpandIntoStringLeaveEscaped(metadataElement.Value, metadataExpansionOptions, metadataElement.Location);
Evaluation\Profiler\EvaluationProfiler.cs (2)
72return _shouldTrackElements ? new EvaluationFrame(this, CurrentLocation.WithFileLineAndElement(element.Location.File, element.Location.Line, element)) : null;
Evaluation\ProjectParser.cs (3)
598ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name); 607ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name); 630ProjectErrorUtilities.ThrowInvalidProject(onError.Location, "NodeMustBeLastUnderElement", XMakeElements.onError, XMakeElements.target, childElement.Name);
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (1)
127propertyElement.Location,
Instance\ProjectInstance.cs (1)
3107ElementLocation toolsVersionLocation = xml.Location;
Instance\ProjectTaskInstance.cs (1)
110_location = element.Location;
Instance\TaskRegistry.cs (3)
421ProjectErrorUtilities.ThrowInvalidProject(projectUsingTaskXml.Location, "InvalidAttributeValueWithException", assemblyFile, XMakeAttributes.assemblyFile, XMakeElements.usingTask, ex.Message); 1747_inlineTaskXmlBody = expander.ExpandIntoStringLeaveEscaped(taskElement.TaskBody, expanderOptions, taskElement.Location); 1826parameter.Location,
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (1)
84/// Access to remote <see cref="ProjectElement.Location"/>.
Microsoft.Build.Engine.OM.UnitTests (14)
Construction\ElementLocationPublic_Tests.cs (6)
35Assert.Equal(project.FullPath, target.Location.File); 52Assert.Equal(project.FullPath, target.Location.File); 57Assert.Equal(project.FullPath, target.Location.File); 73ElementLocation e1 = target.Location; 76Assert.True(Object.ReferenceEquals(e1, target.Location)); 119string locations = project.Xml.Location.LocationString + "\r\n";
Construction\ProjectItemElement_Tests.cs (4)
103Assert.Equal(4, metadatum1.Location.Line); 104Assert.Equal(4, metadatum2.Location.Line); 105Assert.Equal(27, metadatum1.Location.Column); 106Assert.Equal(43, metadatum2.Location.Column);
Construction\ProjectRootElement_Tests.cs (1)
1769projectFileAssert.Invoke(initialLocation, reloadLocation, rootElement.AllChildren.Last().Location.File);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
402VerifySameLocation(realXml.Location, viewXml.Location, context);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectElementLink.cs (1)
37public ElementLocation Location => Source.Location;
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskRegistry_Tests.cs (1)
1794string expandedBody = RegistryExpander.ExpandIntoStringAndUnescape(body, ExpanderOptions.ExpandPropertiesAndItems, bodyElement.Location);