install or update command
See original GitHub issue@PaymonK commented on Fri Nov 09 2018
Currently the dotnet tool update
command will ALWAYS reinstall the latest version of the tool, even if it’s already installed and is up-to-date. This is slow and wasteful.
Recommended fix: Change the update
command, so it doesn’t unnecessarily reinstall it. You can add --force
option to keep the current behaviour though. Alternatively, if you don’t want to change the current behaviour, at least add an option such as --no-force
or --skip-when-up-to-date
.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 7df78c19-0c6f-fe28-213c-b51dd73398ef
- Version Independent ID: 80822879-4c2e-1c28-ae04-1adb5e7e8a99
- Content: dotnet tool install command - .NET Core CLI
- Content Source: docs/core/tools/dotnet-tool-install.md
- Product: dotnet-core
- GitHub Login: @mairaw
- Microsoft Alias: mairaw
@Thraka commented on Fri Nov 09 2018
@PaymonK thanks for contacting us. 😄
Global tools are NuGet packages, which as a system, doesn’t provide some sort of mechanism to update individual files from one version to another. Updating to the latest involves removing the existing package, downloading the latest, and installing it.
That being said, I’m not sure I fully understand your question. I’m going to close this but please feel free to continue to comment.
@PaymonK commented on Sun Nov 11 2018
@Thraka thanks for the reply. Though, I can’t see why this functionality is not built-in as it’s an essential need. I think other similar echo systems such as npm have a way to check if the currently installed tool is the latest version and if not, update it.
We can of course achieve this by creating yet another .net global tool that does just that 😃 so one can write:
c:> dotnet-tool install-or-update -g {package-name}
@Thraka commented on Mon Nov 12 2018
Perhaps I didn’t understand your suggestion. Are you saying that when someone calls dotnet tool update
and the package is already the latest version, the same latest version is again downloaded?
@PaymonK commented on Mon Nov 12 2018
Yes that’s what’s currently happening, which is wasteful and slow.
@Thraka commented on Mon Nov 12 2018
Gotcha. I thought that you meant that you wanted the update command to just download the individual files. You’re first sentence says “Currently when a dot net tool is installed, there is no command to update it to the latest version.” but the update
command does do an update. Could you restate your suggestion and I’ll find who to assign this issue to.
Thanks!
@PaymonK commented on Mon Nov 12 2018
I updated the issue description. When can I expect the fix?
@Thraka commented on Tue Nov 13 2018
@PaymonK Well the docs is not the appropriate place to request new features or updated features. I think you should request that over at https://github.com/dotnet/cli/issues. Github just added the ability to transfer issues so I’ll get that moved over.
@Thraka commented on Tue Nov 13 2018
@mairaw @KathleenDollard can one of you transfer this issue over to the https://github.com/dotnet/cli repo?
@mairaw commented on Tue Nov 13 2018
@Thraka the new feature doesn’t allow us to move issues to repos where we don’t have write perms. But I can move this with ZenHub.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top GitHub Comments
The waste becomes important when a number of .net global tools are used in a build script.
In our case the build process involves several steps including a number of .net global tools. We want the latest versions to be used.
The current wasteful approach will lead to a lot of unnecessary downloads each time we simply build.
This looks like a duplicate of #10408