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
Is there a way to package a binary as a global tool #9503
Comments
This is not currently supported. It is in our backlog but we don't really have a milestone planned to implement the feature at the moment. |
@wli3 @peterhuene do we already have a bug for this that we can point to or should we use this one? |
I don't think we have one. Let's use this one. On another thread. I find a lot of the questions can be answered by my internal document. I wonder if we can organize it and make it available. @sanisoclem thank you for your question
This is TFM your tool is targeting. So under our current model, IF binary is supported, it should be any.
It is TFM/RID. Currently only any (has to be OS agnostic) is supported, so this field need to be any.
Only dotnet is valid runner today. We do plan to expend it. So the field is left for future. |
what would it take to make this possible? |
it would be more of a product discussion. Tool's benefit today is the producer would only need to consider their .NET project since we can make the assumption of .NET SDK and runtime being available on the both side(transfer IL). However, there are many solutions today available to distribute binary like Windows store and homebrew. And also because of the inherent complexity of delivery machine specific binary, I don't think .NET SDK will bring much to the table. |
Currently, .NET cannot handle native packages. So, this is WiP and still draft. Fore details refer to dotnet/sdk#9503 First contribution for yoheimuta#337
Steps to reproduce
I have native binaries (one for each platform) that I want to package as global CLI tools to make it available in my dotnet projects. I would prefer to not rewrite it in C#. I know that there are non .net projects in nuget like https://github.com/edenhill/librdkafka but can't find any info/example of a native dotnet tool.
Is this possible?
I also raised this question in SO
Expected behavior
Packaging a set of native binaries with metadata (entry point, supported platforms) in a .nupkg will be installable with
dotnet tool install -g
. It would choose the appropriate binaries based on the platform and~/.dotnet/tools
.Actual behavior
Can't find a way to do this in the documentation.
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: