3 writes to taskItem
Microsoft.Build.Tasks.Core (2)
ComReferenceInfo.cs (2)
103this.taskItem = new TaskItem(copyFrom.taskItem); 139this.taskItem = originalTaskItem;
Microsoft.Build.Tasks.UnitTests (1)
ResolveComReference_Tests.cs (1)
252referenceInfo.taskItem = taskItem;
36 references to taskItem
Microsoft.Build.Tasks.Core (31)
ComReferenceInfo.cs (4)
103this.taskItem = new TaskItem(copyFrom.taskItem); 202if (taskItem != null) 204return taskItem.ItemSpec; 215internal string SourceItemSpec => taskItem?.ItemSpec;
ResolveComReference.cs (27)
372string wrapperType = projectRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool); 783if (ComReferenceTypes.IsAxImp(axRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool))) 789string tlbWrapperType = tlbRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool); 795axRefInfo.taskItem.SetMetadata(ComReferenceItemMetadataNames.tlbReferenceName, tlbRefInfo.typeLibName); 800string embedInteropTypes = tlbRefInfo.taskItem.GetMetadata(ItemMetadataNames.embedInteropTypes); 807Log.LogMessageFromResources(MessageImportance.High, "ResolveComReference.TreatingTlbOfActiveXAsNonEmbedded", tlbRefInfo.taskItem.ItemSpec, axRefInfo.taskItem.ItemSpec); 810tlbRefInfo.taskItem.SetMetadata(ItemMetadataNames.embedInteropTypes, "false"); 825Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.AddingMissingTlbReference", axRefInfo.taskItem.ItemSpec); 829newTlbRef.taskItem.SetMetadata(ComReferenceItemMetadataNames.wrapperTool, ComReferenceTypes.primaryortlbimp); 830newTlbRef.taskItem.SetMetadata(ItemMetadataNames.embedInteropTypes, "false"); 834axRefInfo.taskItem.SetMetadata(ComReferenceItemMetadataNames.tlbReferenceName, newTlbRef.typeLibName); 858bool isolated = MetadataConversionUtilities.TryConvertItemMetadataToBool(projectRefInfo.taskItem, "Isolated", out bool metadataFound); 866moduleItem.SetMetadata("Name", projectRefInfo.taskItem.ItemSpec); 895Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.Resolving", referenceInfo.taskItem.ItemSpec, referenceInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool)); 905referenceInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool), 906referenceInfo.taskItem.ItemSpec, true, referenceInfo.dependentWrapperPaths, out ComReferenceWrapperInfo wrapperInfo)) 909referenceInfo.taskItem.CopyMetadataTo(referencePathItem); 916Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.ResolvedReference", referenceInfo.taskItem.ItemSpec, wrapperInfo.path); 924Log.LogWarningWithCodeFromResources("ResolveComReference.CannotFindWrapperForTypeLib", referenceInfo.taskItem.ItemSpec); 957string wrapperType = projectRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool); 1083wrapperType = referenceInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool); 1333if (ComReferenceTypes.IsTlbImp(projectRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool))) 1558string wrapperType = projectRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool); 1573Log.LogWarningWithCodeFromResources("ResolveComReference.ConflictingReferences", projectRefInfo.taskItem.ItemSpec, conflictingRef.taskItem.ItemSpec);
Microsoft.Build.Tasks.UnitTests (5)
ResolveComReference_Tests.cs (5)
435Assert.Equal(newTlbInfo.taskItem.ItemSpec, axRefInfo.taskItem.ItemSpec); // "The added reference should have the same task item spec as the Ax reference" 436Assert.Equal(ComReferenceTypes.primaryortlbimp, newTlbInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.wrapperTool)); // "The added reference should have the tlbimp/primary wrapper tool" 801var embedInteropTypes = tlbRefInfo.taskItem.GetMetadata(ItemMetadataNames.embedInteropTypes); 805axRefInfo.taskItem.GetMetadata(ComReferenceItemMetadataNames.tlbReferenceName),