. NET Core CLI Tools Documentation Dotnet-install Script Reference

Source: Internet
Author: User
Tags dotnet

Name

Dotnet-install.ps1 | dotnet-install.sh-Scripts and shared runtimes for installing the Command Line Interface (CLI) tools

Profile

Windows:

DOTNET-INSTALL.PS1 [-channel] [-version] [-installdir] [-debug] [-nopath] [-sharedruntime]

OS X/linux:

dotnet-install.sh [--channel] [--version] [--install-dir] [--debug] [--no-path] [--shared-runtime]

Describe

The Dotnet-install installation script is used to perform non-administrator installation of the CLI Toolchain and the shared runtime. You can download the script from our CLI GitHub repo.

It is primarily used to help automate scenarios and non-administrator installations. There are two scripts, one for PowerShell working on Windows and another for bash scripts that work on Linux/os X. They both have the same behavior. Bash scripts can also "understand" the switch for PowerShell, so you can use them across the line.

The installation script downloads the Zip/tarball (compressed package) file from the CLI and will probably be installed in the default location or in the location specified by--install-dir. By default, the installation script downloads the SDK and installs it, and if you just want to get the shared runtime, you can specify the--shared-runtime parameter.

By default, the installation script adds the installation location to the $PATH of the current session. This can be overridden if the--no-path parameter is used.

Before you run the script, install all the dependencies that you must have.

You can use the--version parameter to install a specified version. The specified version requires a 3-part version (for example: 1.0.0-13232). If omitted, it defaults to the first Global.json file containing the Sdkversion node found in the parent folder of the called script. If it does not exist, it will use the latest.

You can also use this script to get the debug binaries for the SDK or shared runtime debug symbols by using the--debug parameter. If you do not do this for the first time, you actually need to debug the symbols later, and you can use this parameter to rerun the script with the version you installed.

Options

Options implemented by different scripts.

PowerShell (Windows)

-channel [Channel]

Installed channels (for example: "Future", "Preview", "Production"). The default version is "Production".

-version [Version]

The version of the CLI installed. You need to specify a 3-part version (for example: 1.0.0-13232). If omitted, it defaults to the first Global.json file containing the Sdkversion node found in the parent folder of the called script. If it does not exist, it will use the latest.

-installdir [DIR]

The path of the installation. If the directory does not exist, create it. The default value is%localappdata%\.dotnet.

-debug

True indicates that a larger package with debug symbols should be used; otherwise, false. The default value is False.

-nopath

True indicates that the prefix/installation directory is not exported to the current session's path; otherwise, false. The default value is False, which is that PATH is modified. This makes the CLI tool available immediately after installation.

-sharedruntime

True to install only the shared runtime. False to install the entire SDK. The default value is False.

Bash (OS x/linux)

--channel [Channel]

Installed channels (for example: "Future", "Preview", "Production"). The default version is "Production".

--version [Version]

The version of the CLI installed. You need to specify a 3-part version (for example: 1.0.0-13232). If omitted, it defaults to the first Global.json file that contains the Sdkversion node. If it does not exist, it will use the latest.

--install-dir [dir]

The path of the installation. If the directory does not exist, create it. The default value is%home%/.dotnet.

--debug

True indicates that a larger package with debug symbols should be used; otherwise, false. The default value is False.

--no-path

True indicates that the prefix/installation directory is not exported to the current session's path; otherwise, false. The default value is False, which is that PATH is modified. This makes the CLI tool available immediately after installation.

--shared-runtime

True to install only the shared runtime. False to install the entire SDK. The default value is False.

Example

Windows:

./dotnet-install.ps1-channel Future

OS X/linux:

./dotnet-install.sh--channel Future

Install the latest development version to the default location.

Windows:

./dotnet-install.ps1-channel Preview-installdir C:\cli

OS X/linux:

./dotnet-install.sh--channel Preview--install-dir ~/cli

Installs the latest preview version to the specified location.

  • Related Article

    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.