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

Publish as .NET Core Global Tool #90

Closed
snebjorn opened this issue Apr 23, 2018 · 5 comments
Closed

Publish as .NET Core Global Tool #90

snebjorn opened this issue Apr 23, 2018 · 5 comments

Comments

@snebjorn
Copy link

snebjorn commented Apr 23, 2018

With the upcoming release of dotnet core 2.1 they're introducing global tools. It works like NPM global tools (npm install -g package)

That would a nice alternative way to install MiniCover. So instead of having a tools project you can simply do dotnet install tool -g minicover

@nlowe
Copy link

nlowe commented Jun 9, 2018

It looks like some work will need to be done to support installation as a global tool, the existing package cannot be installed as a global tool:

$ dotnet tool install -g minicover --version 2.0.0-ci-20180517205544
error NU1212: Invalid project-package combination for MiniCover 2.0.0-ci-20180517205544. DotnetToolReference project style can only contain references of the DotnetTool type 
The tool package could not be restored.
Tool 'minicover' 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.

@jinhong-
Copy link

This would be super useful, especially for configuring build servers. It looks quite simple to implement:
https://www.meziantou.net/2018/06/11/how-to-publish-a-dotnet-global-tool-with-net-core-2-1
Just need to add 2 lines into the .csproj

   <PackAsTool>true</PackAsTool>
   <ToolCommandName>MyDotNetCoreTool</ToolCommandName>

Although, this will break compatibility with the older releases

@SirDragonClaw
Copy link

Has there been any movement on this issue?

@lucaslorentz
Copy link
Owner

No Daniel, I didn't work on it yet.
Have you tried https://github.com/tonerdo/coverlet ?
It seems to be a better alternative nowadays.

@lucaslorentz
Copy link
Owner

Fixed on version v3.0.0-alpha-1

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

No branches or pull requests

5 participants