2 writes to ContainingProject
Microsoft.Build (2)
Construction\ProjectElement.cs (2)
68ContainingProject = containingProject; 433ContainingProject = projectRootElement;
88 references to ContainingProject
Microsoft.Build (78)
Construction\ProjectElement.cs (3)
171_parent = new WrapperForProjectRootElement(ContainingProject); 258return Parent.ContainingProject; 344return Clone(ContainingProject);
Construction\ProjectElementContainer.cs (7)
369childContainer.DeepClone(ContainingProject, this); 373AppendChild(child.Clone(ContainingProject)); 423childContainer.DeepClone(clone.ContainingProject, clone); 427clone.AppendChild(child.Clone(clone.ContainingProject)); 684ErrorUtilities.VerifyThrowInvalidOperation(Parent != null || ContainingProject == this, "OM_ParentNotParented"); 687ErrorUtilities.VerifyThrowInvalidOperation(child.ContainingProject == ContainingProject, "OM_MustBeSameProject");
Construction\ProjectImportGroupElement.cs (1)
67ProjectImportElement newImport = ContainingProject.CreateImportElement(project);
Construction\ProjectItemDefinitionElement.cs (1)
84ProjectMetadataElement metadata = ContainingProject.CreateMetadataElement(name);
Construction\ProjectItemDefinitionGroupElement.cs (1)
57ProjectItemDefinitionElement itemDefinition = ContainingProject.CreateItemDefinitionElement(itemType);
Construction\ProjectItemElement.cs (1)
405ProjectMetadataElement metadata = ContainingProject.CreateMetadataElement(name);
Construction\ProjectItemGroupElement.cs (1)
135ProjectItemElement newItem = ContainingProject.CreateItemElement(itemType, include);
Construction\ProjectPropertyGroupElement.cs (1)
64ProjectPropertyElement newProperty = ContainingProject.CreatePropertyElement(name);
Construction\ProjectTargetElement.cs (3)
355ProjectItemGroupElement itemGroup = ContainingProject.CreateItemGroupElement(); 368ProjectPropertyGroupElement propertyGroup = ContainingProject.CreatePropertyGroupElement(); 383ProjectTaskElement task = ContainingProject.CreateTaskElement(taskName);
Construction\ProjectTaskElement.cs (2)
244ProjectOutputElement outputItem = ContainingProject.CreateOutputElement(taskParameter, itemType, null); 274ProjectOutputElement outputProperty = ContainingProject.CreateOutputElement(taskParameter, null, propertyName);
Construction\ProjectUsingTaskElement.cs (2)
210UsingTaskParameterGroupElement newParameterGroup = ContainingProject.CreateUsingTaskParameterGroupElement(); 221ProjectUsingTaskBodyElement newTaskBody = ContainingProject.CreateUsingTaskBodyElement(evaluate, taskBody);
Construction\UsingTaskParameterGroupElement.cs (1)
76ProjectUsingTaskParameterElement newParameter = ContainingProject.CreateUsingTaskParameterElement(name, output, required, parameterType);
Definition\Project.cs (7)
2614var includeItemspec = new EvaluationItemSpec(itemElement.Include, _data.Expander, itemElement.IncludeLocation, itemElement.ContainingProject.DirectoryPath); 2644var excludeItemspec = new EvaluationItemSpec(itemElement.Exclude, _data.Expander, itemElement.ExcludeLocation, itemElement.ContainingProject.DirectoryPath); 2684var removeSpec = new EvaluationItemSpec(itemElement.Remove, _data.Expander, itemElement.RemoveLocation, itemElement.ContainingProject.DirectoryPath); 2807EvaluationItemSpec expandedItemSpec = new EvaluationItemSpec(itemSpec, _data.Expander, elementLocation, itemElement.ContainingProject.DirectoryPath, expandProperties: true); 2947ReferenceEquals(property.Xml.ContainingProject, Xml)) 3168VerifyThrowInvalidOperationNotImported(property.Xml.ContainingProject); 3656VerifyThrowInvalidOperationNotImported(item.Xml.ContainingProject);
Definition\ProjectItem.cs (7)
251bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _project.Xml); 578Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 640Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 690Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 786Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 820_xml = _xml.ContainingProject.CreateItemElement(ItemType, ((IItem)this).EvaluatedIncludeEscaped); 853? BuiltInMetadata.GetMetadataValueEscaped(_project.DirectoryPath, _evaluatedIncludeBeforeWildcardExpansionEscaped, _evaluatedIncludeEscaped, Xml.ContainingProject.FullPath, modifierKind, ref _cachedModifiers)
Definition\ProjectItemDefinition.cs (1)
165Project.VerifyThrowInvalidOperationNotImported(metadatum.Xml.ContainingProject);
Definition\ProjectMetadata.cs (2)
135Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 214bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _parent.Project.Xml);
Definition\ProjectProperty.cs (2)
404Project.VerifyThrowInvalidOperationNotImported(_xml.ContainingProject); 477bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _project.Xml);
Definition\ResolvedImport.cs (1)
43IsImported = importingElement != null && !ReferenceEquals(project.Xml, importingElement.ContainingProject);
Evaluation\Evaluator.cs (20)
423items.Add(itemFactory.CreateItem(includeSplitFileEscaped, includeSplitEscaped, itemElement.ContainingProject.FullPath)); 1717importElement.ContainingProject.FullPath, 1725ProjectFile = importElement.ContainingProject.FullPath 1839ProjectFile = importElement.ContainingProject.FullPath, 2037importElement.ContainingProject.FullPath, 2043ProjectFile = importElement.ContainingProject.FullPath, 2098importElement.ContainingProject.FullPath, 2104ProjectFile = importElement.ContainingProject.FullPath, 2150string importedBy = importElement.ContainingProject.FullPath ?? string.Empty; 2174if (previouslyImportedAt.ContainingProject != _projectRootElement && importElement.ContainingProject != _projectRootElement) 2193bool explicitlyLoaded = importElement.ContainingProject.IsExplicitlyLoaded; 2239importElement.ContainingProject.FullPath, 2246ProjectFile = importElement.ContainingProject.FullPath 2270importElement.ContainingProject.FullPath, 2276ProjectFile = importElement.ContainingProject.FullPath, 2325importElement.ContainingProject.FullPath, 2331ProjectFile = importElement.ContainingProject.FullPath, 2401string importedBy = importElement.ContainingProject.FullPath; 2503return element.ContainingProject.DirectoryPath;
Evaluation\LazyItemEvaluator.cs (2)
111return element.ContainingProject.DirectoryPath; 135var clonedItem = itemFactory.CreateItem(Item, OriginatingItemElement.ContainingProject.FullPath);
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
98itemsToAdd.Add(_itemFactory.CreateItem(value, value, _itemElement.ContainingProject.FullPath)); 141itemsToAdd.Add(_itemFactory.CreateItem(includeSplitFileEscaped, glob, _itemElement.ContainingProject.FullPath));
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (2)
214itemContext.OperationItem.SetMetadata(metadataElement, FileUtilities.MaybeAdjustFilePath(evaluatedValue, metadataElement.ContainingProject.DirectoryPath)); 251evaluatedValue = FileUtilities.MaybeAdjustFilePath(evaluatedValue, metadataElement.ContainingProject.DirectoryPath);
Instance\ProjectInstance.cs (2)
3467item.Xml.ContainingProject.EscapedFullPath, 3527item.Xml.ContainingProject.EscapedFullPath,
Instance\ProjectItemDefinitionInstance.cs (1)
219ProjectItemDefinitionElement element = parent.ContainingProject.CreateItemDefinitionElement(ItemType);
Instance\ProjectItemInstance.cs (1)
708ProjectItemElement item = parent.ContainingProject.CreateItemElement(ItemType);
Instance\ProjectPropertyInstance.cs (1)
308ProjectPropertyElement property = parent.ContainingProject.CreatePropertyElement(Name);
Instance\TaskRegistry.cs (2)
296projectUsingTaskXml.ContainingProject.DirectoryPath, 710projectUsingTaskInXml.ContainingProject.FullPath);
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (1)
54/// Access to remote <see cref="ProjectElement.ContainingProject"/>.
NuGet.CommandLine.XPlat (10)
Utility\MSBuildAPIUtility.cs (10)
251var packageVersions = project.Items.Where(item => item.ItemType == PACKAGE_VERSION_TYPE_TAG && item.EvaluatedInclude.Equals(packageReferenceArgs.PackageId) && !item.Xml.ContainingProject.FullPath.Equals(directoryPackagesPropsPath)); 259var packageReferenceOutsideProjectFile = project.Items.Where(item => item.ItemType == PACKAGE_REFERENCE_TYPE_TAG && item.Xml.ContainingProject.FullPath.Equals(directoryPackagesPropsPath)); 421Debug.Assert(directoryBuildPropsRootElement.ContainingProject.FullPath != project.FullPath); 450Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgAdded, libraryDependency.Name, packageVersion, itemGroup.ContainingProject.FullPath 466Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgAdded, libraryDependency.Name, packageVersion, itemGroup.ContainingProject.FullPath)); 481Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgCPM, libraryDependency.Name, itemGroup.ContainingProject.FullPath, project.GetPropertyValue(DirectoryPackagesPropsPathPropertyName))); 605packageReferenceItem.Xml.ContainingProject.FullPath)); 625project.Save(packageReferenceItemElement.ContainingProject); 643project.Save(packageVersionItemElement.ContainingProject); 671importedPackageReference.Xml.ContainingProject.FullPath));