Docs: Any way to install one tool located in my machine ?

Created on 27 Jul 2018  Â·  5Comments  Â·  Source: dotnet/docs

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.

Area - .NET Core Guide product-question

Most helpful comment

@JohnTortugo

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

@wli3 for more nuance if needed.

All 5 comments

@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.

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

@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.

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

@JohnTortugo

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

@wli3 for more nuance if needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stjepan picture stjepan  Â·  3Comments

sdmaclea picture sdmaclea  Â·  3Comments

svick picture svick  Â·  3Comments

gmatv picture gmatv  Â·  3Comments

tswett picture tswett  Â·  3Comments