docs icon indicating copy to clipboard operation
docs copied to clipboard

Any way to install one tool located in my machine ?

Open ucavalcante opened this issue 8 years ago • 5 comments

im develop one console app and want know if i can install without publish with nuget for testing purpuse.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ucavalcante avatar Jul 27 '18 18:07 ucavalcante

@ucavalcante

I assume you are creating a global tool with dotnet pack with PackAsTool == true in the project.

  1. You tool is a normal console application. You can test it's functionality by calling it directly or by using unit tests. When that is done...

  2. dotnet pack and use the --output switch to put your package on your local drive This creates a local NuGet package in the location you specify.

To test the installation of your tool use the --add-source switch on dotnet tool install to find your package. You may also specify a --tool-path if you'd prefer to keep the tool you're testing separated from your other install tools.

Let me know if that isn't enough to get you started.

KathleenDollard avatar Jul 27 '18 23:07 KathleenDollard

Going to go ahead and close this as it appears resolved. @ucavalcante, if that isn't the case, please reopen. Thanks!

JRAlexander avatar Jul 31 '18 16:07 JRAlexander

@KathleenDollard / @JRAlexander , I came here for the same thing. Might be useful to addition to the docs. Currently the --tool-path is documented, but it would be even clearer if you had a specific "How to test your tools locally" section.

johnkors avatar Aug 18 '18 06:08 johnkors

What's the default list of feeds the dotnet tool search the package on?

JohnTortugo avatar Aug 20 '19 23:08 JohnTortugo

@JohnTortugo

Internally, this uses standard NuGet restore. It uses the normal NuGet.config (or it's default)

@wli3 for more nuance if needed.

KathleenDollard avatar Aug 22 '19 22:08 KathleenDollard