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

'dotnet new --install' is deprecated #32195

Closed
dalumedic opened this issue Nov 4, 2022 · 2 comments
Closed

'dotnet new --install' is deprecated #32195

dalumedic opened this issue Nov 4, 2022 · 2 comments
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Comments

@dalumedic
Copy link

Warning: use of 'dotnet new --install' is deprecated. Use 'dotnet new install' instead.
For more information, run:
dotnet new install -h


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@gewarren
Copy link
Contributor

Related to #32949

@adegeo adegeo added the doc-bug label Dec 27, 2022
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Dec 27, 2022
@ghost ghost added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Dec 27, 2022
mavaddat added a commit to mavaddat/MassTransit that referenced this issue Jun 2, 2023
# dotnet new install

**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions

## Name

`dotnet new install` - installs a template package.

## Synopsis

```dotnetcli
dotnet new install <PATH|NUGET_ID>  [--interactive] [--add-source|--nuget-source <SOURCE>] [--force] 
    [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
```

## Description

The `dotnet new install` command installs a template package from the `PATH` or `NUGET_ID` provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format `<package-name>::<package-version>`. By default, `dotnet new` passes \* for the version, which represents the latest stable package version. For more information, see the [Examples](#examples) section.

If a version of the template package was already installed when you run this command, the template package will be updated to the specified version. If no version is specified, the package is updated to the latest stable version.
Starting with .NET SDK 6.0.100, if the argument specifies the version, and that version of the NuGet package is already installed, it won't be reinstalled.
If the argument is a `PATH` and it's already installed, it won't be reinstalled.

Prior to .NET SDK 6.0.100, template packages were managed individually for each .NET SDK version, including [patch versions](../releases-and-support.md#servicing-updates).
For example, if you install the template package using `dotnet new --install` in .NET SDK 5.0.100, it will be installed only for .NET SDK 5.0.100. Templates from the package won't be available in other .NET SDK versions installed on your machine.

Starting with .NET SDK 6.0.100, installed template packages are available in later .NET SDK versions installed on your machine. A template package installed in .NET SDK 6.0.100 will also be available in .NET SDK 6.0.101, .NET SDK 6.0.200, and so on. However, these template packages won't be available in .NET SDK versions prior to .NET SDK 6.0.100. To use a template package installed in .NET SDK 6.0.100 or later in earlier .NET SDK versions, you need to install it using `dotnet new install` in that .NET SDK version.

> [!NOTE]
> [!INCLUDE [new syntax](../../../includes/dotnet-new-7-0-syntax.md)]
>
> Examples of old syntax:
>
> - Install the latest version of Azure web jobs project template package:
>
>   ```dotnetcli
>   dotnet new --install Microsoft.Azure.WebJobs.ProjectTemplates
>   ```


dotnet/docs#32195
phatboyg pushed a commit to MassTransit/MassTransit that referenced this issue Jul 10, 2023
… instead. (#4413)

* Update in-memory.md

# dotnet new install

**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions

## Name

`dotnet new install` - installs a template package.

## Synopsis

```dotnetcli
dotnet new install <PATH|NUGET_ID>  [--interactive] [--add-source|--nuget-source <SOURCE>] [--force] 
    [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
```

## Description

The `dotnet new install` command installs a template package from the `PATH` or `NUGET_ID` provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format `<package-name>::<package-version>`. By default, `dotnet new` passes \* for the version, which represents the latest stable package version. For more information, see the [Examples](#examples) section.

If a version of the template package was already installed when you run this command, the template package will be updated to the specified version. If no version is specified, the package is updated to the latest stable version.
Starting with .NET SDK 6.0.100, if the argument specifies the version, and that version of the NuGet package is already installed, it won't be reinstalled.
If the argument is a `PATH` and it's already installed, it won't be reinstalled.

Prior to .NET SDK 6.0.100, template packages were managed individually for each .NET SDK version, including [patch versions](../releases-and-support.md#servicing-updates).
For example, if you install the template package using `dotnet new --install` in .NET SDK 5.0.100, it will be installed only for .NET SDK 5.0.100. Templates from the package won't be available in other .NET SDK versions installed on your machine.

Starting with .NET SDK 6.0.100, installed template packages are available in later .NET SDK versions installed on your machine. A template package installed in .NET SDK 6.0.100 will also be available in .NET SDK 6.0.101, .NET SDK 6.0.200, and so on. However, these template packages won't be available in .NET SDK versions prior to .NET SDK 6.0.100. To use a template package installed in .NET SDK 6.0.100 or later in earlier .NET SDK versions, you need to install it using `dotnet new install` in that .NET SDK version.

> [!NOTE]
> [!INCLUDE [new syntax](../../../includes/dotnet-new-7-0-syntax.md)]
>
> Examples of old syntax:
>
> - Install the latest version of Azure web jobs project template package:
>
>   ```dotnetcli
>   dotnet new --install Microsoft.Azure.WebJobs.ProjectTemplates
>   ```


dotnet/docs#32195

* Update templates.md

Warning: use of 'dotnet new --install' is deprecated. Use 'dotnet new install' instead.
For more information, run:
   dotnet new install -h

* Update 1.in-memory.md

Warning: use of 'dotnet new --install' is deprecated. Use 'dotnet new install' instead.
For more information, run:
   dotnet new install -h
@adegeo
Copy link
Contributor

adegeo commented Sep 18, 2023

Duplicate of #32949

@adegeo adegeo marked this as a duplicate of #32949 Sep 18, 2023
@adegeo adegeo closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

No branches or pull requests

4 participants