[Early adopters] mom doesn't have to worry anymore. Dotnet Core program released:. NET Core Global Tools

Source: Internet
Author: User
Tags dotnet

what is. NET Core Global Tools?

Global Tools is one of the first features in. NET Core 2.1. Global Tools provides a way for a developer to write a. NET core app that can be packaged as a NuGet package delivery. If the. NET core is running on the target platform, then a properly packaged global tool can run on it. One interesting thing that JavaScript developers might find is that this tool is a direct reference to NPM Global tools.

The Setup (tool) commands are as follows:

dotnet Install Tool-g Dotnetsay

To uninstall a program (tool) that is already installed:

dotnet Tool Uninstall-g Dotnetsay

To view the installed programs (tools):

dotnet Tool List-g

How do I pack a program tool?
    1. Create a new Console project
    2. New plus ispackable and Packastool nodes, with a value of true
      <project sdk= "MICROSOFT.NET.SDK" >  <PropertyGroup>    <OutputType>Exe</OutputType>    <TargetFramework>netcoreapp2.1</TargetFramework>    <generatepackageonbuild>true</ generatepackageonbuild>    <IsPackable>true</IsPackable>    <packastool>true</ packastool>  </PropertyGroup></Project>
    3. After the compilation project is complete, you can see the xxx.1.0.0.nupkg in Bin\Debug
    4. Upload to nuget.org, need a small audit time, upload completed as follows

please start your show!

Open the command line and run:

dotnet Tool Install--global Lewissayhello

Test Program (tool)

[Early adopters] mom doesn't have to worry anymore. Dotnet Core program released:. NET core Global Tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.