diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/Utility/MSBuildAPIUtility.cs b/src/NuGet.Core/NuGet.CommandLine.XPlat/Utility/MSBuildAPIUtility.cs index dc9addf3a45..242e3fa1427 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/Utility/MSBuildAPIUtility.cs +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/Utility/MSBuildAPIUtility.cs @@ -262,15 +262,13 @@ private void AddPackageVersionIntoPropsItemGroup(Project project, ProjectItemGro // Add both package reference information and version metadata using the PACKAGE_VERSION_TYPE_TAG. var item = itemGroup.AddItem(PACKAGE_VERSION_TYPE_TAG, libraryDependency.Name); var packageVersion = AddVersionMetadata(libraryDependency, item); - + AddExtraMetadataToProjectItemElement(libraryDependency, item); Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgAdded, libraryDependency.Name, packageVersion, itemGroup.ContainingProject.FullPath )); - - AddExtraMetadataToProjectItemElement(libraryDependency, item); } /// @@ -284,10 +282,8 @@ private void AddPackageReferenceIntoItemGroup(ProjectItemGroupElement itemGroup, // Add both package reference information and version metadata using the PACKAGE_REFERENCE_TYPE_TAG. var item = itemGroup.AddItem(PACKAGE_REFERENCE_TYPE_TAG, libraryDependency.Name); var packageVersion = AddVersionMetadata(libraryDependency, item); - - Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgAdded, libraryDependency.Name, packageVersion, itemGroup.ContainingProject.FullPath)); - AddExtraMetadataToProjectItemElement(libraryDependency, item); + Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgAdded, libraryDependency.Name, packageVersion, itemGroup.ContainingProject.FullPath)); } /// @@ -301,10 +297,8 @@ private void AddPackageReferenceIntoItemGroupCPM(Project project, ProjectItemGro { // Only add the package reference information using the PACKAGE_REFERENCE_TYPE_TAG. ProjectItemElement item = itemGroup.AddItem(PACKAGE_REFERENCE_TYPE_TAG, libraryDependency.Name); - - Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgCPM, libraryDependency.Name, project.GetPropertyValue(DirectoryPackagesPropsPathPropertyName), itemGroup.ContainingProject.FullPath)); - AddExtraMetadataToProjectItemElement(libraryDependency, item); + Logger.LogInformation(string.Format(CultureInfo.CurrentCulture, Strings.Info_AddPkgCPM, libraryDependency.Name, project.GetPropertyValue(DirectoryPackagesPropsPathPropertyName), itemGroup.ContainingProject.FullPath)); } ///