Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not trim off the end of NuGet package names #54279

Merged
merged 2 commits into from
Jun 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
JoeRobich marked this conversation as resolved.
Show resolved Hide resolved
break;
case UnusedReferencesTableKeyNames.UpdateAction:
content = ReferenceUpdate.Action;
Expand Down