Skip to content

Commit

Permalink
Merge pull request #54279 from JoeRobich/fix-package-name
Browse files Browse the repository at this point in the history
Do not trim off the end of NuGet package names
  • Loading branch information
JoeRobich authored Jun 22, 2021
2 parents 959382f + dec1b18 commit 1e26754
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ public bool TryGetValue(string keyName, out object? content)
content = ReferenceUpdate.ReferenceInfo.ReferenceType;
break;
case UnusedReferencesTableKeyNames.ReferenceName:
// It is unnecessary to display the full path to project and assembly files.
content = Path.GetFileNameWithoutExtension(ReferenceUpdate.ReferenceInfo.ItemSpecification);
// For Project and Assembly references, use the file name instead of overwhelming the user with the full path.
content = ReferenceUpdate.ReferenceInfo.ReferenceType != ReferenceType.Package
? Path.GetFileName(ReferenceUpdate.ReferenceInfo.ItemSpecification)
: ReferenceUpdate.ReferenceInfo.ItemSpecification;
break;
case UnusedReferencesTableKeyNames.UpdateAction:
content = ReferenceUpdate.Action;
Expand Down

0 comments on commit 1e26754

Please sign in to comment.