DOTNET-NEW-SDK-TEMPLATES(1)

πŸ“¦ version 6.0.136, in ubuntu jammy

✨ .NET default templates for dotnet new ✨

okay bestie, gather round, because this is DOTNET-NEW-SDK-TEMPLATES(1) and it is lowkey one of the most useful pages in the whole .NET universe πŸ’–

The way that when you install the .NET SDK (https://dotnet.microsoft.com/download) you just… get over a dozen built-in templates for creating projects and files? Not me being dramatic, it's literally true. You get templates for console apps, class libraries, unit test projects, ASP.NET Core apps (including Angular (https://angular.io/) and React (https://reactjs.org/) projects), and configuration files. All of them. Pre-installed. No cap. πŸ‘‘

To list the built-in templates, run the dotnet new command with the -l|--list option:

dotnet new --list

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.

✨ THE ICONIC TEMPLATE LINEUP ✨

  • Console Application β€” short name console β€” languages [C#], F#, VB β€” tags Common/Console β€” introduced in 1.0
  • Class library β€” short name classlib β€” languages [C#], F#, VB β€” tags Common/Library β€” introduced in 1.0
  • WPF Application β€” short name wpf β€” languages [C#], VB β€” tags Common/WPF β€” introduced in 3.0 (5.0 for VB)
  • WPF Class library β€” short name wpflib β€” languages [C#], VB β€” tags Common/WPF β€” introduced in 3.0 (5.0 for VB)
  • WPF Custom Control Library β€” short name wpfcustomcontrollib β€” languages [C#], VB β€” tags Common/WPF β€” introduced in 3.0 (5.0 for VB)
  • WPF User Control Library β€” short name wpfusercontrollib β€” languages [C#], VB β€” tags Common/WPF β€” introduced in 3.0 (5.0 for VB)
  • Windows Forms (WinForms) Application β€” short name winforms β€” languages [C#], VB β€” tags Common/WinForms β€” introduced in 3.0 (5.0 for VB)
  • Windows Forms (WinForms) Class library β€” short name winformslib β€” languages [C#], VB β€” tags Common/WinForms β€” introduced in 3.0 (5.0 for VB)
  • Worker Service β€” short name worker β€” languages [C#] β€” tags Common/Worker/Web β€” introduced in 3.0
  • Unit Test Project β€” short name mstest β€” languages [C#], F#, VB β€” tags Test/MSTest β€” introduced in 1.0
  • NUnit 3 Test Project β€” short name nunit β€” languages [C#], F#, VB β€” tags Test/NUnit β€” introduced in 2.1.400
  • NUnit 3 Test Item β€” short name nunit-test β€” languages [C#], F#, VB β€” tags Test/NUnit β€” introduced in 2.2
  • xUnit Test Project β€” short name xunit β€” languages [C#], F#, VB β€” tags Test/xUnit β€” introduced in 1.0
  • Razor Component β€” short name razorcomponent β€” languages [C#] β€” tags Web/ASP.NET β€” introduced in 3.0
  • Razor Page β€” short name page β€” languages [C#] β€” tags Web/ASP.NET β€” introduced in 2.0
  • MVC ViewImports β€” short name viewimports β€” languages [C#] β€” tags Web/ASP.NET β€” introduced in 2.0
  • MVC ViewStart β€” short name viewstart β€” languages [C#] β€” tags Web/ASP.NET β€” introduced in 2.0
  • Blazor Server App β€” short name blazorserver β€” languages [C#] β€” tags Web/Blazor β€” introduced in 3.0
  • Blazor WebAssembly App β€” short name blazorwasm β€” languages [C#] β€” tags Web/Blazor/WebAssembly β€” introduced in 3.1.300
  • ASP.NET Core Empty β€” short name web β€” languages [C#], F# β€” tags Web/Empty β€” introduced in 1.0
  • ASP.NET Core Web App (Model-View-Controller) β€” short name mvc β€” languages [C#], F# β€” tags Web/MVC β€” introduced in 1.0
  • ASP.NET Core Web App β€” short names webapp, razor β€” languages [C#] β€” tags Web/MVC/Razor Pages β€” introduced in 2.2, 2.0
  • ASP.NET Core with Angular β€” short name angular β€” languages [C#] β€” tags Web/MVC/SPA β€” introduced in 2.0
  • ASP.NET Core with React.js β€” short name react β€” languages [C#] β€” tags Web/MVC/SPA β€” introduced in 2.0
  • ASP.NET Core with React.js and Redux β€” short name reactredux β€” languages [C#] β€” tags Web/MVC/SPA β€” introduced in 2.0
  • Razor Class Library β€” short name razorclasslib β€” languages [C#] β€” tags Web/Razor/Library/Razor Class Library β€” introduced in 2.1
  • ASP.NET Core Web API β€” short name webapi β€” languages [C#], F# β€” tags Web/WebAPI β€” introduced in 1.0
  • ASP.NET Core gRPC Service β€” short name grpc β€” languages [C#] β€” tags Web/gRPC β€” introduced in 3.0
  • dotnet gitignore file β€” short name gitignore β€” tags Config β€” introduced in 3.0
  • global.json file β€” short name globaljson β€” tags Config β€” introduced in 2.0
  • NuGet Config β€” short name nugetconfig β€” tags Config β€” introduced in 1.0
  • Dotnet local tool manifest file β€” short name tool-manifest β€” tags Config β€” introduced in 3.0
  • Web Config β€” short name webconfig β€” tags Config β€” introduced in 1.0
  • Solution File β€” short name sln β€” tags Solution β€” introduced in 1.0
  • Protocol Buffer File β€” short name proto β€” tags Web/gRPC β€” introduced in 3.0

🌸 Template options 🌸

Each template may have additional options available. The core templates have the following additional options:


πŸ’… console

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target. Available since .NET Core 3.0 SDK.

The following table lists the default values according to the SDK version number you're using:

  • SDK version 5.0 β†’ default value net5.0
  • SDK version 3.1 β†’ default value netcoreapp3.1
  • SDK version 3.0 β†’ default value netcoreapp3.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 SDK 5.0 installed, then the only value available for --framework is net5.0. If you install SDK 3.1, the value netcoreapp3.1 becomes available for --framework. If you install SDK 2.1, netcoreapp2.1 becomes available, and so on. So by specifying --framework netcoreapp2.1 you can use SDK 2.1 even while running dotnet new in SDK 5.0.

Alternatively, to create a project that targets a framework earlier than the SDK that you're using, you might be able to do it by installing the NuGet package for the template. Common (https://www.nuget.org/packages?q=Microsoft.DotNet.Common.ProjectTemplates), web (https://www.nuget.org/packages?q=Microsoft.DotNet.Web.ProjectTemplates), and SPA (https://www.nuget.org/packages?q=Microsoft.DotNet.Web.Spa.ProjectTemplates) project types use different packages per target framework moniker (TFM). For example, to create a console project that targets netcoreapp1.0, run dotnet new --install on Microsoft.DotNet.Common.ProjectTemplates.1.x.

  • --langVersion <VERSION_NUMBER> β€” Sets the LangVersion property in the created project file. For example, use --langVersion 7.3 to use C# 7.3. Not supported for F#. Available since .NET Core 2.2 SDK.

For a list of default C# versions, see Defaults.

  • --no-restore β€” If specified, doesn't execute an implicit restore during project creation. Available since .NET Core 2.2 SDK.

πŸŽ€ classlib

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target. Values: net5.0 or netcoreapp<version> to create a .NET Class Library or netstandard<version> to create a .NET Standard Class Library. The default value for .NET 5.0 SDK is net5.0.

To create a project that targets a framework earlier than the SDK that you're using, see --framework for console projects earlier in this article.

  • --langVersion <VERSION_NUMBER> β€” Sets the LangVersion property in the created project file. For example, use --langVersion 7.3 to use C# 7.3. Not supported for F#. Available since .NET Core 2.2 SDK.

For a list of default C# versions, see Defaults.

  • --no-restore β€” Doesn't execute an implicit restore during project creation.

πŸ¦‹ wpf, wpflib, wpfcustomcontrollib, wpfusercontrollib

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target. The default value is net5.0. Available since .NET Core 3.1 SDK.

To create a project that targets a framework earlier than the SDK that you're using, see --framework for console projects earlier in this article.

  • --langVersion <VERSION_NUMBER> β€” Sets the LangVersion property in the created project file. For example, use --langVersion 7.3 to use C# 7.3.

For a list of default C# versions, see Defaults.

  • --no-restore β€” Doesn't execute an implicit restore during project creation.

🫢 winforms, winformslib

  • --langVersion <VERSION_NUMBER> β€” Sets the LangVersion property in the created project file. For example, use --langVersion 7.3 to use C# 7.3.

For a list of default C# versions, see Defaults.

  • --no-restore β€” Doesn't execute an implicit restore during project creation.

πŸ’œ worker, grpc

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target. The default value is netcoreapp3.1. Available since .NET Core 3.1 SDK.

To create a project that targets a framework earlier than the SDK that you're using, see --framework for console projects earlier in this article.

  • --exclude-launch-settings β€” Excludes launchSettings.json from the generated template.
  • --no-restore β€” Doesn't execute an implicit restore during project creation.

⭐ mstest, xunit

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target. Option available since .NET Core 3.0 SDK.

The following table lists the default values according to the SDK version number you're using:

  • SDK version 5.0 β†’ default value net5.0
  • SDK version 3.1 β†’ default value netcoreapp3.1
  • SDK version 3.0 β†’ default value netcoreapp3.0

To create a project that targets a framework earlier than the SDK that you're using, see --framework for console projects earlier in this article.

  • -p, --enable-pack β€” Enables packaging for the project using dotnet pack.
  • --no-restore β€” Doesn't execute an implicit restore during project creation.

πŸ“ nunit

  • -f, --framework <FRAMEWORK> β€” Specifies the framework to target.

The following table lists the default values according to the SDK version number you're using:

  • SDK version 5.0 β†’ default value net5.0
  • SDK version 3.1 β†’ default value netcoreapp3.1
  • SDK version 3.0 β†’ default value netcoreapp3.0
  • SDK version 2.2 β†’ default value netcoreapp2.2
  • SDK version 2.1 β†’ default value netcoreapp2.1

To create a project that targets a framework earlier than the SDK that you're using, see --framework for console projects earlier in this article.

  • -p, --enable-pack
bestie the page literally cuts off right here mid-option 😭 part 2 has the rest, keep scrolling energy 🫢

Enables packaging for the project using dotnet pack. 🎁

  • --no-restore β€” doesn't run an implicit restore while your project is being created. let it cook on its own, bestie.

πŸŽ€ page

  • -na, --namespace <NAMESPACE_NAME> β€” the namespace for your generated code. default is MyApp.Namespace.
  • -np, --no-pagemodel β€” makes the page without a PageModel. no model, no problem. πŸ’…

πŸ¦‹ viewimports, proto

  • -na, --namespace <NAMESPACE_NAME> β€” namespace for the generated code. default is MyApp.Namespace. yes, same one, she's consistent. ✨

πŸ”₯ blazorserver

  • -au, --auth <AUTHENTICATION_TYPE> β€” which flavor of authentication to use. the possible values are:
    • None β€” no authentication (this is the default).
    • Individual β€” individual authentication.
    • IndividualB2C β€” individual authentication with Azure AD B2C.
    • SingleOrg β€” organizational authentication for a single tenant.
    • MultiOrg β€” organizational authentication for multiple tenants.
    • Windows β€” Windows authentication.
  • --aad-b2c-instance <INSTANCE> β€” the Azure Active Directory B2C instance to connect to. use it with IndividualB2C authentication. default is https://login.microsoftonline.com/tfp/.
  • -ssp, --susi-policy-id <ID> β€” the sign-in and sign-up policy ID for this project. use it with IndividualB2C authentication.
  • -rp, --reset-password-policy-id <ID> β€” the reset password policy ID for this project. use it with IndividualB2C authentication.
  • -ep, --edit-profile-policy-id <ID> β€” the edit profile policy ID for this project. use it with IndividualB2C authentication.
  • --aad-instance <INSTANCE> β€” the Azure Active Directory instance to connect to. use it with SingleOrg or MultiOrg authentication. default is https://login.microsoftonline.com/.
  • --client-id <ID> β€” the Client ID for this project. use it with IndividualB2C, SingleOrg, or MultiOrg authentication. default is 11111111-1111-1111-11111111111111111.
  • --domain <DOMAIN> β€” the domain for the directory tenant. use it with SingleOrg or IndividualB2C authentication. default is qualified.domain.name.
  • --tenant-id <ID> β€” the TenantId ID of the directory to connect to. use it with SingleOrg authentication. default is 22222222-2222-2222-2222-222222222222.
  • --callback-path <PATH> β€” the request path within the application's base path of the redirect URI. use it with SingleOrg or IndividualB2C authentication. default is /signin-oidc.
  • -r, --org-read-access β€” lets this application have read-access to the directory. only applies to SingleOrg or MultiOrg authentication.
  • --exclude-launch-settings β€” keeps launchSettings.json out of the generated template. bye bestie πŸ‘‹
  • --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 β€” says 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.

πŸ’– blazorwasm

  • -f, --framework <FRAMEWORK> β€” picks the framework to target.

the default values depend on which SDK version number you're using:

  • SDK version 5.0 β†’ net5.0
  • SDK version 3.1 β†’ netcoreapp3.1

to create a project that targets a framework earlier than the SDK you're using, see --framework for console projects 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 <AUTHENTICATION_TYPE> β€” the type of authentication to use. the possible values are:
    • None β€” no authentication (this is the default).
    • Individual β€” individual authentication.
    • IndividualB2C β€” individual authentication with Azure AD B2C.
    • SingleOrg β€” organizational authentication for a single tenant.
  • --authority <AUTHORITY> β€” the authority of the OIDC provider. use it with Individual authentication. default is https://login.microsoftonline.com/.
  • --aad-b2c-instance <INSTANCE> β€” the Azure Active Directory B2C instance to connect to. use it with IndividualB2C authentication. default is https://aadB2CInstance.b2clogin.com/.
  • -ssp, --susi-policy-id <ID> β€” the sign-in and sign-up policy ID for this project. use it with IndividualB2C authentication.
  • --aad-instance <INSTANCE> β€” the Azure Active Directory instance to connect to. use it with SingleOrg authentication. default is https://login.microsoftonline.com/.
  • --client-id <ID> β€” the Client ID for this project. use it with IndividualB2C, SingleOrg, or Individual authentication in standalone scenarios. default is 33333333-3333-3333-33333333333333333.
  • --domain <DOMAIN> β€” the domain for the directory tenant. use it with SingleOrg or IndividualB2C authentication. default is qualified.domain.name.
  • --app-id-uri <URI> β€” the App ID Uri for the server API you want to call. use it with SingleOrg or IndividualB2C authentication. default is api.id.uri.
  • --api-client-id <ID> β€” the Client ID for the API that the server hosts. use it with SingleOrg or IndividualB2C authentication. default is 11111111-1111-1111-11111111111111111.
  • -s, --default-scope <SCOPE> β€” the API scope the client needs to request to provision an access token. use it with SingleOrg or IndividualB2C authentication. default is user_impersonation.
  • --tenant-id <ID> β€” the TenantId ID of the directory to connect to. use it with SingleOrg authentication. default is 22222222-2222-2222-2222-222222222222.
  • -r, --org-read-access β€” lets this application have read-access to the directory. only applies to SingleOrg authentication.
  • --exclude-launch-settings β€” keeps launchSettings.json out of the generated template.
  • -p, --pwa β€” produces a Progressive Web Application (PWA) supporting installation and offline use. offline mode? we love her. 🌈
  • --no-https β€” turns off HTTPS. this option only applies if Individual, IndividualB2C, or SingleOrg aren't being used for --auth.
  • -uld, --use-local-db β€” says LocalDB should be used instead of SQLite. only applies to Individual or IndividualB2C authentication.
  • --called-api-url <URL> β€” URL of the API to call from the web app. only applies to SingleOrg or IndividualB2C authentication without an ASP.NET Core host specified. default is https://graph.microsoft.com/v1.0/me.
  • --calls-graph β€” specifies if the web app calls Microsoft Graph. only applies to SingleOrg authentication.
  • --called-api-scopes <SCOPES> β€” 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. default is user.read.

🌸 web

  • --exclude-launch-settings β€” keeps launchSettings.json out of the generated template.
  • -f, --framework <FRAMEWORK> β€” picks the framework to target. this option isn't available in the .NET Core 2.2 SDK.

the default values depend on which SDK version number you're using:

  • SDK version 5.0 β†’ net5.0
  • SDK version 3.1 β†’ netcoreapp3.1
  • SDK version 3.0 β†’ netcoreapp3.0
  • SDK version 2.1 β†’ netcoreapp2.1

to create a project that targets a framework earlier than the SDK you're using, see --framework for console projects earlier in this article.

  • --no-restore β€” doesn't execute an implicit restore during project creation.
  • --no-https β€” turns off HTTPS.

πŸ‘‘ mvc, webapp

  • -au, --auth <AUTHENTICATION_TYPE> β€” the type of authentication to use. the possible values are:
    • None β€” no authentication (this is the default).
    • Individual β€” individual authentication.
    • IndividualB2C β€” individual authentication with Azure AD B2C.
    • SingleOrg β€” organizational authentication for a single tenant.
    • MultiOrg β€” organizational authentication for multiple tenants.
    • Windows β€” Windows authentication.
  • --aad-b2c-instance <INSTANCE> β€” the Azure Active Directory B2C instance to connect to. use it with IndividualB2C authentication. default is https://login.microsoftonline.com/tfp/.
  • -ssp, --susi-policy-id <ID> β€” the sign-in and sign-up policy ID for this project. use it with IndividualB2C authentication.
  • -rp, --reset-password-policy-id <ID> β€” the reset password policy ID for this project. use it with IndividualB2C authentication.
  • -ep, --edit-profile-policy-id <ID> β€” the edit profile policy ID for this project. use it with IndividualB2C authentication.
  • --aad-instance <INSTANCE> β€” the Azure Active Directory instance to connect to. use it with SingleOrg or MultiOrg authentication. default is https://login.microsoftonline.com/.
  • --client-id <ID> β€” the Client ID for this project. use it with IndividualB2C, SingleOrg, or MultiOrg authentication. default is 11111111-1111-1111-11111111111111111.
  • --domain <DOMAIN> β€” the domain for the directory tenant. use it with SingleOrg or IndividualB2C authentication. default is qualified.domain.name.
  • --tenant-id <ID> β€” the TenantId ID of the directory to connect to. use it with SingleOrg authentication. default is 22222222-2222-2222-2222-222222222222.
  • --callback-path <PATH> β€” the request path within the application's base path of the redirect URI. use it with SingleOrg or IndividualB2C authentication. default is /signin-oidc.
  • -r, --org-read-access β€” lets this application have read-access to the directory. only applies to SingleOrg or MultiOrg authentication.
  • --exclude-launch-settings β€” keeps launchSettings.json out of the generated template.
  • --no-https β€” 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.

  • -f, --framework <FRAMEWORK> β€” picks the framework you wanna target, bestie. option's been around since .NET Core 3.0 SDK.

the defaults are literally:

  • SDK 5.0 β†’ net5.0
  • SDK 3.1 β†’ netcoreapp3.1
  • SDK 3.0 β†’ netcoreapp3.0

wanna target something older than the SDK you're on? see --framework for console projects earlier in this article. periodt.

  • --no-restore β€” doesn’t execute an implicit restore during project creation.
  • --use-browserlink β€” drops BrowserLink into the project. heads up: not available in .NET Core 2.2 and 3.1 SDK. πŸ’€
  • -rrc, --razor-runtime-compilation β€” decides if the project gets Razor runtime compilation in Debug builds. available since .NET Core 3.1.201 SDK. slay.

πŸŽ€ angular, react πŸŽ€

  • -au, --auth <AUTHENTICATION_TYPE> β€” the type of auth to use. available since .NET Core 3.0 SDK.

possible values:

  • None β€” no authentication (default).
  • Individual β€” individual authentication.
  • --exclude-launch-settings β€” keeps launchSettings.json out of the generated template.
  • --no-restore β€” doesn’t execute an implicit restore during project creation.
  • --no-https β€” turns off HTTPS. this option only applies if authentication is None.
  • -uld, --use-local-db β€” says LocalDB should be used instead of SQLite. only applies to Individual or IndividualB2C authentication. available since .NET Core 3.0 SDK.
  • -f, --framework <FRAMEWORK> β€” specifies the framework to target. option not available in .NET Core 2.2 SDK.

defaults:

  • 5.0 β†’ net5.0
  • 3.1 β†’ netcoreapp3.1
  • 3.0 β†’ netcoreapp3.0
  • 2.1 β†’ netcoreapp2.0

for earlier targets, see --framework for console projects earlier in this article.


βš›οΈ reactredux βš›οΈ

  • --exclude-launch-settings β€” excludes launchSettings.json from the generated template.
  • -f, --framework <FRAMEWORK> β€” specifies the framework to target. option not available in .NET Core 2.2 SDK.

defaults:

  • 5.0 β†’ net5.0
  • 3.1 β†’ netcoreapp3.1
  • 3.0 β†’ netcoreapp3.0
  • 2.1 β†’ netcoreapp2.0

for earlier targets, see --framework for console projects earlier in this article.

  • --no-restore β€” doesn’t execute an implicit restore during project creation.
  • --no-https β€” turns off HTTPS.

🧩 razorclasslib 🧩

  • --no-restore β€” doesn’t execute an implicit restore during project creation.
  • -s, --support-pages-and-views β€” supports adding traditional Razor pages and Views in addition to components to this library. available since .NET Core 3.0 SDK.

🌐 webapi 🌐

  • -au, --auth <AUTHENTICATION_TYPE> β€” the type of authentication to use. possible values:
    • None β€” no authentication (default).
    • IndividualB2C β€” individual authentication with Azure AD B2C.
    • SingleOrg β€” organizational authentication for a single tenant.
    • Windows β€” Windows authentication.
  • --aad-b2c-instance <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 <ID> β€” the sign-in and sign-up policy ID for this project. use with IndividualB2C authentication.
  • --aad-instance <INSTANCE> β€” the Azure Active Directory instance to connect to. use with SingleOrg authentication. the default value is https://login.microsoftonline.com/.
  • --client-id <ID> β€” the Client ID for this project. use with IndividualB2C or SingleOrg authentication. the default value is 11111111-1111-1111-11111111111111111.
  • --domain <DOMAIN> β€” the domain for the directory tenant. use with IndividualB2C or SingleOrg authentication. the default value is qualified.domain.name.
  • --tenant-id <ID> β€” the TenantId ID of the directory to connect to. use with SingleOrg authentication. the default value is 22222222-2222-2222-2222-222222222222.
  • -r, --org-read-access β€” allows this application read-access to the directory. only applies to SingleOrg authentication.
  • --exclude-launch-settings β€” excludes launchSettings.json from the generated template.
  • --no-https β€” turns off HTTPS. app.UseHsts and app.UseHttpsRedirection aren’t added to Startup.Configure. 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 IndividualB2C authentication.
  • -f, --framework <FRAMEWORK> β€” specifies the framework to target. option not available in .NET Core 2.2 SDK.

defaults:

  • 5.0 β†’ net5.0
  • 3.1 β†’ netcoreapp3.1
  • 3.0 β†’ netcoreapp3.0
  • 2.1 β†’ netcoreapp2.1

for earlier targets, see --framework for console projects earlier in this article.

  • --no-restore β€” doesn’t execute an implicit restore during project creation.

πŸ“„ globaljson πŸ“„

  • --sdk-version <VERSION_NUMBER> β€” specifies the version of the .NET SDK to use in the global.json file.

See also

  • dotnet new command
  • dotnet new –list option
  • Custom templates for dotnet new
  • Create a custom template for dotnet new

and that's the whole page, bestie! the footer's got the source/version and date, but we're not copying it β€” just know it's there. mwah πŸ’‹βœ¨
πŸ“¦ where this page comes from