Skip to content

Commit

Permalink
Change when info is logged
Browse files Browse the repository at this point in the history
  • Loading branch information
pragnya17 authored and Pragnya Pandrate committed Jul 5, 2022
1 parent 3457cb8 commit 2d5c9e4
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
Expand All @@ -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));
}

/// <summary>
Expand All @@ -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));
}

/// <summary>
Expand Down

0 comments on commit 2d5c9e4

Please sign in to comment.