diff --git a/docs/core/tools/dotnet-new-sdk-templates.md b/docs/core/tools/dotnet-new-sdk-templates.md index 31e82674fecaf..2557ecf8a3dd4 100644 --- a/docs/core/tools/dotnet-new-sdk-templates.md +++ b/docs/core/tools/dotnet-new-sdk-templates.md @@ -1,6 +1,6 @@ --- -title: .NET default templates for dotnet new -description: The information about dotnet new templates shipped with dotnet SDK. +title: .NET default templates for 'dotnet new' +description: Learn about 'dotnet new' templates that ship with the .NET SDK. ms.custom: updateeachrelease no-loc: [Blazor, WebAssembly] ms.date: 08/29/2025 @@ -13,15 +13,57 @@ When you install the [.NET SDK](https://dotnet.microsoft.com/download), you rece dotnet new list ``` -[!INCLUDE [templates](../../../includes/templates.md)] - ## Template options -Each template may have additional options available. To show the additional options available for the template use the `--help` option with the template name argument, for example: `dotnet new console --help`. -In case the template supports multiple languages, this command will show help for the template in the default language. By combining it with the `--language` option, you can see the help for other languages: `dotnet new console --help --language F#`. -The templates that ship with the .NET SDK have additional options that are described in the following sections. - -## `buildprops` +The templates that ship with the .NET SDK has template-specific options. To show the additional options available for the template, use the `--help` option with the template name argument, for example: `dotnet new console --help`. The template-specific sections in this article also describe the options. + +If the template supports multiple programming languages, the `--help` option will show help for the template in the default language. By combining it with the `--language` option, you can see the help for other languages: `dotnet new console --help --language F#`. + +## Preinstalled templates + +The following table shows the templates that come preinstalled with the .NET SDK. The default language for the template is shown inside brackets. To see any template-specific options, select the short name link. + +| Templates | Short name | Language | Tags | Introduced | +|-----------------------------|-----------------------------------|----------|-------------------------|------------| +| ASP.NET Core API | [`webapiaot`](#webapiaot) | [C#] | Web/Web API/API/Service | 8.0 | +| ASP.NET Core API controller | [`apicontroller`](#apicontroller) | [C#] | Web/ASP.NET | 8.0 | +| ASP.NET Core Empty | [`web`](#web) | [C#], F# | Web/Empty | 1.0 | +| ASP.NET Core Web API | [`webapi`](#webapi) | [C#], F# | Web/Web API/API/Service/WebAPI | 1.0 | +| ASP.NET Core Web App (Model-View-Controller) | [`mvc`](#web-options) | [C#], F# | Web/MVC | 1.0 | +| ASP.NET Core Web App | [`webapp, razor`](#web-options) | [C#] | Web/MVC/Razor Pages | 2.2, 2.0 | +| ASP.NET Core gRPC Service | [`grpc`](#web-others) | [C#] | Web/gRPC | 3.0 | +| Blazor Web App | [`blazor`](#blazor) | [C#] | Web/Blazor | 8.0.100 | +| Blazor WebAssembly Standalone App | [`blazorwasm`](#blazorwasm) | [C#] | Web/Blazor/WebAssembly/PWA | 3.1.300 | +| Class library | [`classlib`](#classlib) | [C#], F#, VB | Common/Library | 1.0 | +| Console Application | [`console`](#console) | [C#], F#, VB | Common/Console | 1.0 | +| Directory.Build.props file | [`buildprops`](#buildprops) | | Config | 8.0.100 | +| Directory.Build.targets file | [`buildtargets`](#buildtargets) | | Config | 8.0.100 | +| Dotnet local tool manifest file | `tool-manifest` | | Config | 3.0 | +| EditorConfig file | [`editorconfig`](#editorconfig) | | Config | 6.0 | +| global.json file | [`globaljson`](#globaljson) | | Config | 2.0 | +| MSTest Test Class | [`mstest-class`](#mstest-class) | [C#], F#, VB | Test/MSTest | 1.0 | +| MSTest Test Project | [`mstest`](#mstest) | [C#], F#, VB | Test/MSTest | 1.0 | +| NUnit 3 Test Item | `nunit-test` | [C#], F#, VB | Test/NUnit | 2.2 | +| NUnit 3 Test Project | [`nunit`](#nunit) | [C#], F#, VB | Test/NUnit | 2.1.400 | +| NuGet Config | `nugetconfig` | | Config | 1.0 | +| Protocol Buffer File | [`proto`](#namespace) | | Web/gRPC | 3.0 | +| Razor Class Library | [`razorclasslib`](#razorclasslib) | [C#] | Web/Razor/Library/Razor Class Library | 2.1 | +| Razor Component | `razorcomponent` | [C#] | Web/ASP.NET | 3.0 | +| Razor Page | [`page`](#page) | [C#] | Web/ASP.NET | 2.0 | +| Solution File | [`sln`](#sln) | | Solution | 1.0 | +| Web Config | `webconfig` | | Config | 1.0 | +| Windows Forms (WinForms) Application | [`winforms`](#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | +| Windows Forms (WinForms) Class library | [`winformslib`](#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | +| Worker Service | [`worker`](#web-others) | [C#] | Common/Worker/Web | 3.0 | +| WPF Application | [`wpf`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | +| WPF Class library | [`wpflib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | +| WPF Custom Control Library | [`wpfcustomcontrollib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | +| WPF User Control Library | [`wpfusercontrollib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | +| xUnit Test Project | [`xunit`](#xunit) | [C#], F#, VB | Test/xUnit | 1.0 | +| MVC ViewImports | [`viewimports`](#namespace) | [C#] | Web/ASP.NET | 2.0 | +| MVC ViewStart | `viewstart` | [C#] | Web/ASP.NET | 2.0 | + +### `buildprops` Creates a *Directory.Build.props* file for customizing MSBuild properties for an entire folder tree. For more information, see [Customize your build](/visualstudio/msbuild/customize-your-build). @@ -35,7 +77,7 @@ Creates a *Directory.Build.props* file for customizing MSBuild properties for an *** -## `buildtargets` +### `buildtargets` Creates a *Directory.Build.targets* file for customizing MSBuild targets and tasks for an entire folder tree. For more information, see [Customize your build](/visualstudio/msbuild/customize-your-build). @@ -45,7 +87,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `console` +### `console` - **`-f|--framework `** @@ -53,11 +95,11 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas The following table lists the default values according to the SDK version you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | The ability to create a project for an earlier TFM depends on having that version of the SDK installed. For example, if you have only the .NET 9 SDK installed, then the only value available for `--framework` is `net9.0`. If, for example, you install the .NET 8 SDK, the value `net8.0` becomes available for `--framework`. So by specifying `--framework net8.0` you can target .NET 8 even while running `dotnet new` in the .NET 9 SDK. @@ -79,7 +121,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `classlib` +### `classlib` - **`-f|--framework `** @@ -99,7 +141,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `wpf`, `wpflib`, `wpfcustomcontrollib`, `wpfusercontrollib` +### `wpf`, `wpflib`, `wpfcustomcontrollib`, `wpfusercontrollib` - **`-f|--framework `** @@ -117,7 +159,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `winforms`, `winformslib` +### `winforms`, `winformslib` - **`--langVersion `** @@ -131,7 +173,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `worker`, `grpc` +### `worker`, `grpc` - **`-f|--framework `** @@ -153,7 +195,7 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas *** -## `mstest` +### `mstest` - **`-f|--framework `** @@ -161,11 +203,11 @@ Creates a *Directory.Build.targets* file for customizing MSBuild targets and tas The following table lists the default values according to the SDK version number you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | The ability to create a project for an earlier TFM depends on having that version of the SDK installed. For example, if you have only the .NET 9 SDK installed, then the only value available for `--framework` is `net9.0`. If you install, for example, the .NET 8 SDK, the value `net8.0` becomes available for `--framework`. So by specifying `--framework net8.0` you can target .NET 8 even while running `dotnet new` in the .NET 9 SDK. @@ -219,7 +261,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `mstest-class` +### `mstest-class` - **`--fixture `** @@ -237,7 +279,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `xunit` +### `xunit` - **`-f|--framework `** @@ -245,11 +287,11 @@ The ability to create a project for an earlier TFM depends on having that versio The following table lists the default values according to the SDK version number you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | The ability to create a project for an earlier TFM depends on having that version of the SDK installed. For example, if you have only the .NET 9 SDK installed, then the only value available for `--framework` is `net9.0`. If you install, for example, the .NET 8 SDK, the value `net8.0` becomes available for `--framework`. So by specifying `--framework net8.0` you can target .NET 8 even while running `dotnet new` in the .NET 9 SDK. @@ -263,7 +305,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `nunit` +### `nunit` - **`-f|--framework `** @@ -271,11 +313,11 @@ The ability to create a project for an earlier TFM depends on having that versio The following table lists the default values according to the SDK version number you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | The ability to create a project for an earlier TFM depends on having that version of the SDK installed. For example, if you have only the .NET 9 SDK installed, then the only value available for `--framework` is `net9.0`. If you install, for example, the .NET 8 SDK, the value `net8.0` becomes available for `--framework`. So by specifying `--framework net8.0` you can target .NET 8 even while running `dotnet new` in the .NET 9 SDK. @@ -289,7 +331,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `page` +### `page` - **`-na|--namespace `** @@ -301,7 +343,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `viewimports`, `proto` +### `viewimports`, `proto` - **`-na|--namespace `** @@ -309,92 +351,7 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `blazorserver` - -**Discontinued since .NET 8 SDK.** - -- **`-au|--auth `** - - The type of authentication to use. The possible values are: - - - `None` - No authentication (Default). - - `Individual` - Individual authentication. - - `IndividualB2C` - Individual authentication with Azure AD B2C. - - `SingleOrg` - Organizational authentication for a single tenant. [Entra External ID](/entra/external-id/) tenants also use `SingleOrg`. - - `MultiOrg` - Organizational authentication for multiple tenants. - - `Windows` - Windows authentication. - -- **`--aad-b2c-instance `** - - The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. - -- **`-ssp|--susi-policy-id `** - - The sign-in and sign-up policy ID for this project. Use with `IndividualB2C` authentication. - -- **`-rp|--reset-password-policy-id `** - - The reset password policy ID for this project. Use with `IndividualB2C` authentication. - -- **`-ep|--edit-profile-policy-id `** - - The edit profile policy ID for this project. Use with `IndividualB2C` authentication. - -- **`--aad-instance `** - - The Azure Active Directory instance to connect to. Use with `SingleOrg` or `MultiOrg` authentication. The default value is `https://login.microsoftonline.com/`. - -- **`--client-id `** - - The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `MultiOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. - -- **`--domain `** - - The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. - -- **`--tenant-id `** - - The TenantId ID of the directory to connect to. Use with `SingleOrg` authentication. The default value is `22222222-2222-2222-2222-222222222222`. - -- **`--callback-path `** - - The request path within the application's base path of the redirect URI. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `/signin-oidc`. - -- **`-r|--org-read-access`** - - Allows this application read-access to the directory. Only applies to `SingleOrg` or `MultiOrg` authentication. - -- **`--exclude-launch-settings`** - - Excludes *launchSettings.json* from the generated template. - -- **`--no-https`** - - Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, `SingleOrg`, or `MultiOrg` aren't being used for `--auth`. - -- **`-uld|--use-local-db`** - - Specifies LocalDB should be used instead of SQLite. Only applies to `Individual` or `IndividualB2C` authentication. - -- **`--no-restore`** - - Doesn't execute an implicit restore during project creation. - -- **`--kestrelHttpPort`** - - Port number to use for the HTTP endpoint in *launchSettings.json*. - -- **`--kestrelHttpsPort`** - - Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). - -- **`--use-program-main`** - - If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. - -*** - -## `blazor` +### `blazor` - **`-f|--framework `** @@ -448,19 +405,23 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `blazorwasm` +### `web` + +- **`--exclude-launch-settings`** + + Excludes *launchSettings.json* from the generated template. - **`-f|--framework `** - Specifies the [framework](../../standard/frameworks.md) to target. + Specifies the [framework](../../standard/frameworks.md) to target. Option not available in .NET Core 2.2 SDK. The following table lists the default values according to the SDK version number you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. @@ -468,9 +429,25 @@ The ability to create a project for an earlier TFM depends on having that versio Doesn't execute an implicit restore during project creation. -- **`-ho|--hosted`** +- **`--no-https`** - Includes an ASP.NET Core host for the Blazor WebAssembly app. + Turns off HTTPS. + +- **`--kestrelHttpPort`** + + Port number to use for the HTTP endpoint in *launchSettings.json*. + +- **`--kestrelHttpsPort`** + + Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). + +- **`--use-program-main`** + + If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. + +*** + +### `mvc`, `webapp` - **`-au|--auth `** @@ -480,78 +457,86 @@ The ability to create a project for an earlier TFM depends on having that versio - `Individual` - Individual authentication. - `IndividualB2C` - Individual authentication with Azure AD B2C. - `SingleOrg` - Organizational authentication for a single tenant. Entra External ID tenants also use SingleOrg. - -- **`--authority `** - - The authority of the OIDC provider. Use with `Individual` authentication. The default value is `https://login.microsoftonline.com/`. + - `MultiOrg` - Organizational authentication for multiple tenants. + - `Windows` - Windows authentication. - **`--aad-b2c-instance `** - The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://aadB2CInstance.b2clogin.com/`. + The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. - **`-ssp|--susi-policy-id `** The sign-in and sign-up policy ID for this project. Use with `IndividualB2C` authentication. -- **`--aad-instance `** - - The Azure Active Directory instance to connect to. Use with `SingleOrg` authentication. The default value is `https://login.microsoftonline.com/`. - -- **`--client-id `** +- **`-rp|--reset-password-policy-id `** - The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `Individual` authentication in standalone scenarios. The default value is `33333333-3333-3333-33333333333333333`. + The reset password policy ID for this project. Use with `IndividualB2C` authentication. -- **`--domain `** +- **`-ep|--edit-profile-policy-id `** - The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. + The edit profile policy ID for this project. Use with `IndividualB2C` authentication. -- **`--app-id-uri `** +- **`--aad-instance `** - The App ID Uri for the server API you want to call. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `api.id.uri`. + The Azure Active Directory instance to connect to. Use with `SingleOrg` or `MultiOrg` authentication. The default value is `https://login.microsoftonline.com/`. -- **`--api-client-id `** +- **`--client-id `** - The Client ID for the API that the server hosts. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `11111111-1111-1111-11111111111111111`. + The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `MultiOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. -- **`-s|--default-scope `** +- **`--domain `** - The API scope the client needs to request to provision an access token. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `user_impersonation`. + The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. - **`--tenant-id `** The TenantId ID of the directory to connect to. Use with `SingleOrg` authentication. The default value is `22222222-2222-2222-2222-222222222222`. +- **`--callback-path `** + + The request path within the application's base path of the redirect URI. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `/signin-oidc`. + - **`-r|--org-read-access`** - Allows this application read-access to the directory. Only applies to `SingleOrg` authentication. + Allows this application read-access to the directory. Only applies to `SingleOrg` or `MultiOrg` authentication. - **`--exclude-launch-settings`** Excludes *launchSettings.json* from the generated template. -- **`-p|--pwa`** - - produces a Progressive Web Application (PWA) supporting installation and offline use. - - **`--no-https`** - Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, or `SingleOrg` aren't being used for `--auth`. + Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, `SingleOrg`, or `MultiOrg` aren't being used. - **`-uld|--use-local-db`** Specifies LocalDB should be used instead of SQLite. Only applies to `Individual` or `IndividualB2C` authentication. -- **`--called-api-url `** +- **`-f|--framework `** - URL of the API to call from the web app. Only applies to `SingleOrg` or `IndividualB2C` authentication without an ASP.NET Core host specified. The default value is `https://graph.microsoft.com/v1.0/me`. + Specifies the [framework](../../standard/frameworks.md) to target. Option available since .NET Core 3.0 SDK. -- **`--calls-graph`** + The following table lists the default values according to the SDK version number you're using: - Specifies if the web app calls Microsoft Graph. Only applies to `SingleOrg` authentication. + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | -- **`--called-api-scopes `** + To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. - Scopes to request to call the API from the web app. Only applies to `SingleOrg` or `IndividualB2C` authentication without an ASP.NET Core host specified. The default is `user.read`. +- **`--no-restore`** + + Doesn't execute an implicit restore during project creation. + +- **`--use-browserlink`** + + Includes BrowserLink in the project. + +- **`-rrc|--razor-runtime-compilation`** + + Determines if the project is configured to use [Razor runtime compilation](/aspnet/core/mvc/views/view-compilation#runtime-compilation) in Debug builds. - **`--kestrelHttpPort`** @@ -567,41 +552,40 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `web` +### `razorclasslib` -- **`--exclude-launch-settings`** +- **`--no-restore`** - Excludes *launchSettings.json* from the generated template. + Doesn't execute an implicit restore during project creation. -- **`-f|--framework `** +- **`-s|--support-pages-and-views`** - Specifies the [framework](../../standard/frameworks.md) to target. Option not available in .NET Core 2.2 SDK. + Supports adding traditional Razor pages and Views in addition to components to this library. - The following table lists the default values according to the SDK version number you're using: +*** - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | +### `webapiaot` - To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. +Creates a web API project with AOT publish enabled. For more information, see [Native AOT deployment](/dotnet/core/deploying/native-aot) and [The Web API (Native AOT) template](/aspnet/core/fundamentals/native-aot#the-web-api-native-aot-template). -- **`--no-restore`** +- **`--exclude-launch-settings`** - Doesn't execute an implicit restore during project creation. + Excludes *launchSettings.json* from the generated template. -- **`--no-https`** +- **`-f|--framework `** - Turns off HTTPS. + Specifies the [framework](../../standard/frameworks.md) to target. -- **`--kestrelHttpPort`** + The following table lists the default values according to the SDK version number you're using: - Port number to use for the HTTP endpoint in *launchSettings.json*. + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | -- **`--kestrelHttpsPort`** +- **`--no-restore`** - Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). + Doesn't execute an implicit restore during project creation. - **`--use-program-main`** @@ -609,82 +593,80 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `mvc`, `webapp` +### `webapi` - **`-au|--auth `** The type of authentication to use. The possible values are: - `None` - No authentication (Default). - - `Individual` - Individual authentication. - `IndividualB2C` - Individual authentication with Azure AD B2C. - `SingleOrg` - Organizational authentication for a single tenant. Entra External ID tenants also use SingleOrg. - - `MultiOrg` - Organizational authentication for multiple tenants. - `Windows` - Windows authentication. - **`--aad-b2c-instance `** The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. -- **`-ssp|--susi-policy-id `** - - The sign-in and sign-up policy ID for this project. Use with `IndividualB2C` authentication. - -- **`-rp|--reset-password-policy-id `** +- **`-minimal|--use-minimal-apis`** - The reset password policy ID for this project. Use with `IndividualB2C` authentication. + Create a project that uses the [ASP.NET Core minimal API](/aspnet/core/fundamentals/minimal-apis). Default is `false`, but this option is overridden by `-controllers`. Since the default for `-controllers` is `false`, entering `dotnet new webapi` without specifying either option creates a minimal API project. -- **`-ep|--edit-profile-policy-id `** +- **`-ssp|--susi-policy-id `** - The edit profile policy ID for this project. Use with `IndividualB2C` authentication. + The sign-in and sign-up policy ID for this project. Use with `IndividualB2C` authentication. - **`--aad-instance `** - The Azure Active Directory instance to connect to. Use with `SingleOrg` or `MultiOrg` authentication. The default value is `https://login.microsoftonline.com/`. + The Azure Active Directory instance to connect to. Use with `SingleOrg` authentication. The default value is `https://login.microsoftonline.com/`. - **`--client-id `** - The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `MultiOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. + The Client ID for this project. Use with `IndividualB2C` or `SingleOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. + +- **`-controllers|--use-controllers`** + + Whether to use controllers instead of minimal APIs. If both this option and `-minimal` are specified, this option overrides the value specified by `-minimal`. Default is `false`. Available since .NET 8 SDK. - **`--domain `** - The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. + The domain for the directory tenant. Use with `IndividualB2C` or `SingleOrg` authentication. The default value is `qualified.domain.name`. - **`--tenant-id `** The TenantId ID of the directory to connect to. Use with `SingleOrg` authentication. The default value is `22222222-2222-2222-2222-222222222222`. -- **`--callback-path `** - - The request path within the application's base path of the redirect URI. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `/signin-oidc`. - - **`-r|--org-read-access`** - Allows this application read-access to the directory. Only applies to `SingleOrg` or `MultiOrg` authentication. + Allows this application read-access to the directory. Only applies to `SingleOrg` authentication. - **`--exclude-launch-settings`** Excludes *launchSettings.json* from the generated template. +- **`--no-openapi`** + + Turns off OpenAPI (Swagger) support. `AddOpenApi` and `MapOpenApi` aren't called. + - **`--no-https`** - Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, `SingleOrg`, or `MultiOrg` aren't being used. + Turns off HTTPS. No *https* launch profile is created in `launchSettings.json`. `app.UseHsts` and `app.UseHttpsRedirection` aren't called in *Program.cs*/*Startup.cs*. This option only applies if `IndividualB2C` or `SingleOrg` aren't being used for authentication. - **`-uld|--use-local-db`** - Specifies LocalDB should be used instead of SQLite. Only applies to `Individual` or `IndividualB2C` authentication. + Specifies LocalDB should be used instead of SQLite. Only applies to `IndividualB2C` authentication. - **`-f|--framework `** - Specifies the [framework](../../standard/frameworks.md) to target. Option available since .NET Core 3.0 SDK. + Specifies the [framework](../../standard/frameworks.md) to target. Option not available in .NET Core 2.2 SDK. The following table lists the default values according to the SDK version number you're using: - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. @@ -692,29 +674,67 @@ The ability to create a project for an earlier TFM depends on having that versio Doesn't execute an implicit restore during project creation. -- **`--use-browserlink`** +- **`--use-program-main`** - Includes BrowserLink in the project. + If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. -- **`-rrc|--razor-runtime-compilation`** +*** - Determines if the project is configured to use [Razor runtime compilation](/aspnet/core/mvc/views/view-compilation#runtime-compilation) in Debug builds. +### `apicontroller` -- **`--kestrelHttpPort`** +API Controller with or without read/write actions. - Port number to use for the HTTP endpoint in *launchSettings.json*. +- **`-p:n|--name `** -- **`--kestrelHttpsPort`** + The namespace for the generated code. Default is `MyApp.Namespace`. - Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). +- **`-ac|--actions`** -- **`--use-program-main`** + Create a controller with read/write actions. Default is `false`. - If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. +*** + +### `globaljson` + +- **`--sdk-version `** + + Specifies the version of the .NET SDK to use in the *global.json* file. + +- **`--roll-forward `** + + The roll-forward policy to use when selecting an SDK version, either as a fallback when a specific SDK version is missing or as a directive to use a later version. + For more information, see [global-json](global-json.md#rollforward). + +### `sln` + +Creates an empty solution file containing no projects. + +> [!NOTE] +> In .NET SDK 9.0.200 and later, this template supports a `--format` option to choose between `sln` and `slnx` formats. Starting with .NET 10, the default format is `slnx`. *** -## `angular`, `react` +### `editorconfig` + +Creates an *.editorconfig* file for configuring code style preferences. + +- **`--empty`** + + Creates an empty *.editorconfig* instead of the defaults for .NET. + +## Discontinued templates + +The following table shows templates that have been discontinued and no longer come preinstalled with the .NET SDK. To see any template-specific options, select the short name link. + +| Templates | Short name | Language | Tags | Discontinued since | +|----------------------------|---------------------------------------|----------|-------------|--------------------| +| ASP.NET Core with Angular | [`angular`](#spa) | [C#] | Web/MVC/SPA | 8.0 | +| ASP.NET Core with React.js | [`react`](#spa) | [C#] | Web/MVC/SPA | 8.0 | +| Blazor Server App | [`blazorserver`](#blazorserver) | [C#] | Web/Blazor | 8.0 | +| Blazor Server App Empty | [`blazorserver-empty`](#blazorserver) | [C#] | Web/Blazor | 8.0 | +| Blazor WebAssembly App Empty | [`blazorwasm-empty`](#blazorwasm) | [C#] | Web/Blazor/WebAssembly | 8.0 | + +### `angular`, `react` **Discontinued since .NET 8 SDK.** @@ -752,9 +772,9 @@ The ability to create a project for an earlier TFM depends on having that versio > [!NOTE] > There isn't a React template for `net8.0`, however, if you're interested in developing React apps with ASP.NET Core, see [Overview of Single Page Apps (SPAs) in ASP.NET Core](/aspnet/core/client-side/spa/intro?view=aspnetcore-8.0&preserve-view=true). - | SDK version | Default value | - |-------------|-----------------| - | 7.0 | `net7.0` | + | SDK version | Default value | + |-------------|---------------| + | 7.0 | `net7.0` | To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. @@ -772,65 +792,131 @@ The ability to create a project for an earlier TFM depends on having that versio *** -## `razorclasslib` +### `blazorserver` -- **`--no-restore`** +**Discontinued since .NET 8 SDK.** - Doesn't execute an implicit restore during project creation. +- **`-au|--auth `** -- **`-s|--support-pages-and-views`** + The type of authentication to use. The possible values are: - Supports adding traditional Razor pages and Views in addition to components to this library. + - `None` - No authentication (Default). + - `Individual` - Individual authentication. + - `IndividualB2C` - Individual authentication with Azure AD B2C. + - `SingleOrg` - Organizational authentication for a single tenant. [Entra External ID](/entra/external-id/) tenants also use `SingleOrg`. + - `MultiOrg` - Organizational authentication for multiple tenants. + - `Windows` - Windows authentication. -*** +- **`--aad-b2c-instance `** -## `webapiaot` + The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. -Creates a web API project with AOT publish enabled. For more information, see [Native AOT deployment](/dotnet/core/deploying/native-aot) and [The Web API (Native AOT) template](/aspnet/core/fundamentals/native-aot#the-web-api-native-aot-template). +- **`-ssp|--susi-policy-id `** + + The sign-in and sign-up policy ID for this project. Use with `IndividualB2C` authentication. + +- **`-rp|--reset-password-policy-id `** + + The reset password policy ID for this project. Use with `IndividualB2C` authentication. + +- **`-ep|--edit-profile-policy-id `** + + The edit profile policy ID for this project. Use with `IndividualB2C` authentication. + +- **`--aad-instance `** + + The Azure Active Directory instance to connect to. Use with `SingleOrg` or `MultiOrg` authentication. The default value is `https://login.microsoftonline.com/`. + +- **`--client-id `** + + The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `MultiOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. + +- **`--domain `** + + The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. + +- **`--tenant-id `** + + The TenantId ID of the directory to connect to. Use with `SingleOrg` authentication. The default value is `22222222-2222-2222-2222-222222222222`. + +- **`--callback-path `** + + The request path within the application's base path of the redirect URI. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `/signin-oidc`. + +- **`-r|--org-read-access`** + + Allows this application read-access to the directory. Only applies to `SingleOrg` or `MultiOrg` authentication. - **`--exclude-launch-settings`** Excludes *launchSettings.json* from the generated template. -- **`-f|--framework `** +- **`--no-https`** - Specifies the [framework](../../standard/frameworks.md) to target. + Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, `SingleOrg`, or `MultiOrg` aren't being used for `--auth`. - The following table lists the default values according to the SDK version number you're using: +- **`-uld|--use-local-db`** - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | + Specifies LocalDB should be used instead of SQLite. Only applies to `Individual` or `IndividualB2C` authentication. - **`--no-restore`** Doesn't execute an implicit restore during project creation. +- **`--kestrelHttpPort`** + + Port number to use for the HTTP endpoint in *launchSettings.json*. + +- **`--kestrelHttpsPort`** + + Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). + - **`--use-program-main`** If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. *** -## `webapi` +### `blazorwasm` + +- **`-f|--framework `** + + Specifies the [framework](../../standard/frameworks.md) to target. + + The following table lists the default values according to the SDK version number you're using: + + | SDK version | Default value | + |-------------|---------------| + | 9.0 | `net9.0` | + | 8.0 | `net8.0` | + | 7.0 | `net7.0` | + + To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. + +- **`--no-restore`** + + Doesn't execute an implicit restore during project creation. + +- **`-ho|--hosted`** + + Includes an ASP.NET Core host for the Blazor WebAssembly app. - **`-au|--auth `** The type of authentication to use. The possible values are: - `None` - No authentication (Default). + - `Individual` - Individual authentication. - `IndividualB2C` - Individual authentication with Azure AD B2C. - `SingleOrg` - Organizational authentication for a single tenant. Entra External ID tenants also use SingleOrg. - - `Windows` - Windows authentication. -- **`--aad-b2c-instance `** +- **`--authority `** - The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. + The authority of the OIDC provider. Use with `Individual` authentication. The default value is `https://login.microsoftonline.com/`. -- **`-minimal|--use-minimal-apis`** +- **`--aad-b2c-instance `** - Create a project that uses the [ASP.NET Core minimal API](/aspnet/core/fundamentals/minimal-apis). Default is `false`, but this option is overridden by `-controllers`. Since the default for `-controllers` is `false`, entering `dotnet new webapi` without specifying either option creates a minimal API project. + The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://aadB2CInstance.b2clogin.com/`. - **`-ssp|--susi-policy-id `** @@ -842,15 +928,23 @@ Creates a web API project with AOT publish enabled. For more information, see [N - **`--client-id `** - The Client ID for this project. Use with `IndividualB2C` or `SingleOrg` authentication. The default value is `11111111-1111-1111-11111111111111111`. + The Client ID for this project. Use with `IndividualB2C`, `SingleOrg`, or `Individual` authentication in standalone scenarios. The default value is `33333333-3333-3333-33333333333333333`. -- **`-controllers|--use-controllers`** +- **`--domain `** - Whether to use controllers instead of minimal APIs. If both this option and `-minimal` are specified, this option overrides the value specified by `-minimal`. Default is `false`. Available since .NET 8 SDK. + The domain for the directory tenant. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `qualified.domain.name`. -- **`--domain `** +- **`--app-id-uri `** - The domain for the directory tenant. Use with `IndividualB2C` or `SingleOrg` authentication. The default value is `qualified.domain.name`. + The App ID Uri for the server API you want to call. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `api.id.uri`. + +- **`--api-client-id `** + + The Client ID for the API that the server hosts. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `11111111-1111-1111-11111111111111111`. + +- **`-s|--default-scope `** + + The API scope the client needs to request to provision an access token. Use with `SingleOrg` or `IndividualB2C` authentication. The default value is `user_impersonation`. - **`--tenant-id `** @@ -864,84 +958,44 @@ Creates a web API project with AOT publish enabled. For more information, see [N Excludes *launchSettings.json* from the generated template. -- **`--no-openapi`** +- **`-p|--pwa`** - Turns off OpenAPI (Swagger) support. `AddOpenApi` and `MapOpenApi` aren't called. + produces a Progressive Web Application (PWA) supporting installation and offline use. - **`--no-https`** - Turns off HTTPS. No *https* launch profile is created in `launchSettings.json`. `app.UseHsts` and `app.UseHttpsRedirection` aren't called in *Program.cs*/*Startup.cs*. This option only applies if `IndividualB2C` or `SingleOrg` aren't being used for authentication. + Turns off HTTPS. This option only applies if `Individual`, `IndividualB2C`, or `SingleOrg` aren't being used for `--auth`. - **`-uld|--use-local-db`** - Specifies LocalDB should be used instead of SQLite. Only applies to `IndividualB2C` authentication. - -- **`-f|--framework `** - - Specifies the [framework](../../standard/frameworks.md) to target. Option not available in .NET Core 2.2 SDK. - - The following table lists the default values according to the SDK version number you're using: - - | SDK version | Default value | - |-------------|-----------------| - | 9.0 | `net9.0` | - | 8.0 | `net8.0` | - | 7.0 | `net7.0` | - - To create a project that targets a framework earlier than the SDK that you're using, see [`--framework` for `console` projects](#template-options) earlier in this article. - -- **`--no-restore`** - - Doesn't execute an implicit restore during project creation. - -- **`--use-program-main`** - - If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. - -*** - -## `apicontroller` - -API Controller with or without read/write actions. - -- **`-p:n|--name `** + Specifies LocalDB should be used instead of SQLite. Only applies to `Individual` or `IndividualB2C` authentication. - The namespace for the generated code. Default is `MyApp.Namespace`. +- **`--called-api-url `** -- **`-ac|--actions`** + URL of the API to call from the web app. Only applies to `SingleOrg` or `IndividualB2C` authentication without an ASP.NET Core host specified. The default value is `https://graph.microsoft.com/v1.0/me`. - Create a controller with read/write actions. Default is `false`. +- **`--calls-graph`** -*** + Specifies if the web app calls Microsoft Graph. Only applies to `SingleOrg` authentication. -## `globaljson` +- **`--called-api-scopes `** -- **`--sdk-version `** + Scopes to request to call the API from the web app. Only applies to `SingleOrg` or `IndividualB2C` authentication without an ASP.NET Core host specified. The default is `user.read`. - Specifies the version of the .NET SDK to use in the *global.json* file. +- **`--kestrelHttpPort`** -- **`--roll-forward `** + Port number to use for the HTTP endpoint in *launchSettings.json*. - The roll-forward policy to use when selecting an SDK version, either as a fallback when a specific SDK version is missing or as a directive to use a later version. - For more information, see [global-json](global-json.md#rollforward). +- **`--kestrelHttpsPort`** -## `sln` + Port number to use for the HTTPS endpoint in *launchSettings.json*. This option is not applicable when the parameter `no-https` is used (but `no-https` is ignored when an individual or organizational authentication setting is chosen for `--auth`). -Creates an empty solution file containing no projects. +- **`--use-program-main`** -> [!NOTE] -> In .NET SDK 9.0.200 and later, this template supports a `--format` option to choose between `sln` and `slnx` formats. Starting with .NET 10, the default format is `slnx`. + If specified, an explicit `Program` class and `Main` method will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value: `false`. *** -## `editorconfig` - -Creates an *.editorconfig* file for configuring code style preferences. - -- **`--empty`** - - Creates an empty *.editorconfig* instead of the defaults for .NET. - ## See also - [dotnet new command](dotnet-new.md) diff --git a/docs/core/tools/dotnet-new.md b/docs/core/tools/dotnet-new.md index 205dd8a4ab574..dd3efffcf8d6c 100644 --- a/docs/core/tools/dotnet-new.md +++ b/docs/core/tools/dotnet-new.md @@ -56,7 +56,7 @@ To activate tab completion for the .NET SDK, see [Enable tab completion](enable- Starting with .NET SDK 5.0.300, the [`search` command](dotnet-new-search.md) should be used to search for templates in NuGet.org. -[!INCLUDE [templates](../../../includes/templates.md)] + For a list of templates that ship with the .NET SDK, see [Preinstalled templates](dotnet-new-sdk-templates.md#preinstalled-templates). ## Options diff --git a/includes/templates.md b/includes/templates.md deleted file mode 100644 index 6ff82c69199e5..0000000000000 --- a/includes/templates.md +++ /dev/null @@ -1,52 +0,0 @@ -The following table shows the templates that come pre-installed with the .NET SDK. The default language for the template is shown inside the brackets. Click on the short name link to see the specific template options. - -| Templates | Short name | Language | Tags | Introduced | -|----------------------------------------------|-------------------------------------------------------------------------------------|--------------|---------------------------------------|------------------| -| Console Application | [`console`](../docs/core/tools/dotnet-new-sdk-templates.md#console) | [C#], F#, VB | Common/Console | 1.0 | -| Class library | [`classlib`](../docs/core/tools/dotnet-new-sdk-templates.md#classlib) | [C#], F#, VB | Common/Library | 1.0 | -| WPF Application | [`wpf`](../docs/core/tools/dotnet-new-sdk-templates.md#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | -| WPF Class library | [`wpflib`](../docs/core/tools/dotnet-new-sdk-templates.md#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | -| WPF Custom Control Library | [`wpfcustomcontrollib`](../docs/core/tools/dotnet-new-sdk-templates.md#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | -| WPF User Control Library | [`wpfusercontrollib`](../docs/core/tools/dotnet-new-sdk-templates.md#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | -| Windows Forms (WinForms) Application | [`winforms`](../docs/core/tools/dotnet-new-sdk-templates.md#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | -| Windows Forms (WinForms) Class library | [`winformslib`](../docs/core/tools/dotnet-new-sdk-templates.md#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | -| Worker Service | [`worker`](../docs/core/tools/dotnet-new-sdk-templates.md#web-others) | [C#] | Common/Worker/Web | 3.0 | -| MSTest Test Project | [`mstest`](../docs/core/tools/dotnet-new-sdk-templates.md#mstest) | [C#], F#, VB | Test/MSTest | 1.0 | -| MSTest Test Class | [`mstest-class`](../docs/core/tools/dotnet-new-sdk-templates.md#mstest-class) | [C#], F#, VB | Test/MSTest | 1.0 | -| NUnit 3 Test Project | [`nunit`](../docs/core/tools/dotnet-new-sdk-templates.md#nunit) | [C#], F#, VB | Test/NUnit | 2.1.400 | -| NUnit 3 Test Item | `nunit-test` | [C#], F#, VB | Test/NUnit | 2.2 | -| xUnit Test Project | [`xunit`](../docs/core/tools/dotnet-new-sdk-templates.md#xunit) | [C#], F#, VB | Test/xUnit | 1.0 | -| Razor Component | `razorcomponent` | [C#] | Web/ASP.NET | 3.0 | -| Razor Page | [`page`](../docs/core/tools/dotnet-new-sdk-templates.md#page) | [C#] | Web/ASP.NET | 2.0 | -| MVC ViewImports | [`viewimports`](../docs/core/tools/dotnet-new-sdk-templates.md#namespace) | [C#] | Web/ASP.NET | 2.0 | -| MVC ViewStart | `viewstart` | [C#] | Web/ASP.NET | 2.0 | -| Blazor Web App | [`blazor`](../docs/core/tools/dotnet-new-sdk-templates.md#blazor) | [C#] | Web/Blazor | 8.0.100 | -| Blazor WebAssembly Standalone App | [`blazorwasm`](../docs/core/tools/dotnet-new-sdk-templates.md#blazorwasm) | [C#] | Web/Blazor/WebAssembly/PWA | 3.1.300 | -| ASP.NET Core Empty | [`web`](../docs/core/tools/dotnet-new-sdk-templates.md#web) | [C#], F# | Web/Empty | 1.0 | -| ASP.NET Core Web App (Model-View-Controller) | [`mvc`](../docs/core/tools/dotnet-new-sdk-templates.md#web-options) | [C#], F# | Web/MVC | 1.0 | -| ASP.NET Core Web App | [`webapp, razor`](../docs/core/tools/dotnet-new-sdk-templates.md#web-options) | [C#] | Web/MVC/Razor Pages | 2.2, 2.0 | -| Razor Class Library | [`razorclasslib`](../docs/core/tools/dotnet-new-sdk-templates.md#razorclasslib) | [C#] | Web/Razor/Library/Razor Class Library | 2.1 | -| ASP.NET Core Web API | [`webapi`](../docs/core/tools/dotnet-new-sdk-templates.md#webapi) | [C#], F# | Web/Web API/API/Service/WebAPI | 1.0 | -| ASP.NET Core API | [`webapiaot`](../docs/core/tools/dotnet-new-sdk-templates.md#webapiaot) | [C#] | Web/Web API/API/Service | 8.0 | -| ASP.NET Core API controller | [`apicontroller`](../docs/core/tools/dotnet-new-sdk-templates.md#apicontroller) | [C#] | Web/ASP.NET | 8.0 | -| ASP.NET Core gRPC Service | [`grpc`](../docs/core/tools/dotnet-new-sdk-templates.md#web-others) | [C#] | Web/gRPC | 3.0 | -| dotnet gitignore file | `gitignore` | | Config | 3.0 | -| global.json file | [`globaljson`](../docs/core/tools/dotnet-new-sdk-templates.md#globaljson) | | Config | 2.0 | -| NuGet Config | `nugetconfig` | | Config | 1.0 | -| Dotnet local tool manifest file | `tool-manifest` | | Config | 3.0 | -| Web Config | `webconfig` | | Config | 1.0 | -| Directory.Build.props file | [`buildprops`](../docs/core/tools/dotnet-new-sdk-templates.md#buildprops) | | Config | 8.0.100 | -| Directory.Build.targets file | [`buildtargets`](../docs/core/tools/dotnet-new-sdk-templates.md#buildtargets) | | Config | 8.0.100 | -| Solution File | [`sln`](../docs/core/tools/dotnet-new-sdk-templates.md#sln) | | Solution | 1.0 | -| Protocol Buffer File | [`proto`](../docs/core/tools/dotnet-new-sdk-templates.md#namespace) | | Web/gRPC | 3.0 | -| EditorConfig file | [`editorconfig`](../docs/core/tools/dotnet-new-sdk-templates.md#editorconfig) | | Config | 6.0 | - -The following table shows templates that have been discontinued and no longer come pre-installed with the .NET SDK. Click on the short name link to see the specific template options. - -| Templates | Short name | Language | Tags | Discontinued since | -|----------------------------------------------|-------------------------------------------------------------------------------------|--------------|---------------------------------------|------------------| -| ASP.NET Core with Angular | [`angular`](../docs/core/tools/dotnet-new-sdk-templates.md#spa) | [C#] | Web/MVC/SPA | 8.0 | -| ASP.NET Core with React.js | [`react`](../docs/core/tools/dotnet-new-sdk-templates.md#spa) | [C#] | Web/MVC/SPA | 8.0 | -| Blazor Server App | [`blazorserver`](../docs/core/tools/dotnet-new-sdk-templates.md#blazorserver) | [C#] | Web/Blazor | 8.0 | -| Blazor Server App Empty | [`blazorserver-empty`](../docs/core/tools/dotnet-new-sdk-templates.md#blazorserver) | [C#] | Web/Blazor | 8.0 | -| Blazor WebAssembly App Empty | [`blazorwasm-empty`](../docs/core/tools/dotnet-new-sdk-templates.md#blazorwasm) | [C#] | Web/Blazor/WebAssembly | 8.0 |