nwheels-io / NuLink

The missing LINK feature of NuGet: develop & test packages as if they were part of the main project
MIT License
53 stars 15 forks source link

Change usage command to include --global flag #23

Closed sethreidnz closed 4 years ago

sethreidnz commented 5 years ago

When I first ran the command in the readme (without --global) I got the following error:

The tool package could not be restored.
Tool 'nulink' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

Then I noticed on the nuget package page it has the following:

dotnet tool install --global NuLink --version 0.1.0-beta2

This worked. I thought I'd do a PR to help other users in the future.

felix-b commented 5 years ago

@sethreidnz, thank you for finding this! With .NET Core 2.2, both -g and --global work interchangeably on Linux/WIndows/macOS.

(see https://github.com/nwheels-io/NuLink/blob/master/appveyor.yml#L129 and https://github.com/nwheels-io/NuLink/blob/master/appveyor.yml#L57 in the CI script)

What OS and .NET Core version are you using, is it .NET Core 3.x?

sethreidnz commented 5 years ago

Interesting I don't remember installing it but this is my output:

dotnet --version
3.0.100

And I am on:

image

felix-b commented 4 years ago

@sethreidnz It looks like the issue was fixed in .NET Core 3.1 (I've just tested with 3.1.201, Windows 10 Pro), Nevertheless, as --global seems to be safer than -g, I'll also replace it in the NuGet docs.

felix-b commented 4 years ago

@sethreidnz Thank you for this contribution!