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

Fix bug in the unique name generation for tools in the commandline clients #1627

Merged
merged 4 commits into from
Aug 8, 2017

Conversation

nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Aug 8, 2017

Fixes NuGet/Home#5716

Fix bug in the unique name generation for tools in the commandline clients
Align the tool restore experience when a version is not specified among VS and CLIs.

@@ -103,7 +103,7 @@ public override bool Execute()
BuildTasksUtility.CopyPropertyIfExists(msbuildItem, properties, "Version");

properties.TryGetValue("Version", out string value);
var uniqueName = ToolRestoreUtility.GetUniqueName(msbuildItem.ItemSpec, ToolFramework, VersionRange.Parse(value));
var uniqueName = ToolRestoreUtility.GetUniqueName(msbuildItem.ItemSpec, ToolFramework, value != null ? VersionRange.Parse(value) : null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to use VersionRange.All? does that get printed out in a strange way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point.
Refactoring it now.

@nkolev92
Copy link
Member Author

nkolev92 commented Aug 8, 2017

🔔 @emgarten

nkolev92 added a commit that referenced this pull request Aug 8, 2017
…lients (#1627)

* Handle case, during the unique name generation, where there is no version in the tool reference
@nkolev92 nkolev92 merged commit b756579 into dev Aug 8, 2017
@nkolev92 nkolev92 deleted the dev-nkolev92-toolsdeclarationwithnoversion branch August 8, 2017 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants