Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Default templates for
When you install the .NET SDK, you receive over a dozen built-in templates for creating projects and files, including console apps, class libraries, unit test projects, ASP.NET Core apps (including Angular and React projects), and configuration files. To list the built-in templates, run the dotnet new list command:
dotnet new list
Template options
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 | [C#] | Web/Web API/API/Service | 8.0 | 
| ASP.NET Core API controller | apicontroller | [C#] | Web/ASP.NET | 8.0 | 
| ASP.NET Core Empty | web | [C#], F# | Web/Empty | 1.0 | 
| ASP.NET Core Web API | webapi | [C#], F# | Web/Web API/API/Service/WebAPI | 1.0 | 
| ASP.NET Core Web App (Model-View-Controller) | mvc | [C#], F# | Web/MVC | 1.0 | 
| ASP.NET Core Web App | webapp, razor | [C#] | Web/MVC/Razor Pages | 2.2, 2.0 | 
| ASP.NET Core gRPC Service | grpc | [C#] | Web/gRPC | 3.0 | 
| Blazor Web App | blazor | [C#] | Web/Blazor | 8.0.100 | 
| Blazor WebAssembly Standalone App | blazorwasm | [C#] | Web/Blazor/WebAssembly/PWA | 3.1.300 | 
| Class library | classlib | [C#], F#, VB | Common/Library | 1.0 | 
| Console Application | console | [C#], F#, VB | Common/Console | 1.0 | 
| Directory.Build.props file | buildprops | Config | 8.0.100 | |
| Directory.Build.targets file | buildtargets | Config | 8.0.100 | |
| Dotnet local tool manifest file | tool-manifest | Config | 3.0 | |
| EditorConfig file | editorconfig | Config | 6.0 | |
| global.json file | globaljson | Config | 2.0 | |
| MSTest Test Class | mstest-class | [C#], F#, VB | Test/MSTest | 1.0 | 
| MSTest Test Project | 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 | [C#], F#, VB | Test/NUnit | 2.1.400 | 
| NuGet Config | nugetconfig | Config | 1.0 | |
| Protocol Buffer File | proto | Web/gRPC | 3.0 | |
| Razor Class Library | razorclasslib | [C#] | Web/Razor/Library/Razor Class Library | 2.1 | 
| Razor Component | razorcomponent | [C#] | Web/ASP.NET | 3.0 | 
| Razor Page | page | [C#] | Web/ASP.NET | 2.0 | 
| Solution File | sln | Solution | 1.0 | |
| Web Config | webconfig | Config | 1.0 | |
| Windows Forms (WinForms) Application | winforms | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | 
| Windows Forms (WinForms) Class library | winformslib | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) | 
| Worker Service | worker | [C#] | Common/Worker/Web | 3.0 | 
| WPF Application | wpf | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | 
| WPF Class library | wpflib | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | 
| WPF Custom Control Library | wpfcustomcontrollib | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | 
| WPF User Control Library | wpfusercontrollib | [C#], VB | Common/WPF | 3.0 (5.0 for VB) | 
| xUnit Test Project | xunit | [C#], F#, VB | Test/xUnit | 1.0 | 
| MVC ViewImports | viewimports | [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.
- --inherit- If specified, adds an Import element for the closest Directory.Build.props file in the parent directory hierarchy. By default, Directory.Build.props files don't inherit from parent directories, so enabling this option allows you to build up a hierarchy of customizations folder-by-folder. 
- --use-artifacts- If specified, adds a property to enable the artifacts output layout. This is a common pattern for projects that produce build artifacts, such as NuGet packages, that are placed in a common folder structure. For more information, see Artifacts output layout. 
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.
- --inherit- If specified, adds an Import element for the closest Directory.Build.targets file in the parent directory hierarchy. By default, Directory.Build.targets files don't inherit from parent directories, so enabling this option allows you to build up a hierarchy of customizations folder-by-folder. 
console
- -f|--framework <FRAMEWORK>- Specifies the framework to target. - 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- 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 - --frameworkis- net9.0. If, for example, you install the .NET 8 SDK, the value- net8.0becomes available for- --framework. So by specifying- --framework net8.0you can target .NET 8 even while running- dotnet newin the .NET 9 SDK.- 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, web, and SPA project types use different packages per target framework moniker (TFM). For example, to create a - consoleproject that targets- netcoreapp1.0, run- dotnet new installon- Microsoft.DotNet.Common.ProjectTemplates.1.x.
- --langVersion <VERSION_NUMBER>- Sets the - LangVersionproperty in the created project file. For example, use- --langVersion 7.3to use C# 7.3. Not supported for F#.- For a list of default C# versions, see Defaults. 
- --no-restore- If specified, doesn't execute an implicit restore during project creation. 
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false. Available only for C#.
classlib
- -f|--framework <FRAMEWORK>- Specifies the framework to target. Values: - net9.0,- net8.0, or- net7.0to create a .NET Class Library, or- netstandard2.1or- netstandard2.0to create a .NET Standard Class Library. The default value for .NET SDK 9.0.x is- net9.0.- To create a project that targets a framework earlier than the SDK that you're using, see - --frameworkfor- consoleprojects earlier in this article.
- --langVersion <VERSION_NUMBER>- Sets the - LangVersionproperty in the created project file. For example, use- --langVersion 7.3to use C# 7.3. Not supported for F#.- 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. For the .NET 9 SDK, the default value is - net9.0.
- --langVersion <VERSION_NUMBER>- Sets the - LangVersionproperty in the created project file. For example, use- --langVersion 7.3to 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 - LangVersionproperty in the created project file. For example, use- --langVersion 7.3to 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 for .NET 9 SDK is - net9.0.- To create a project that targets a framework earlier than the SDK that you're using, see - --frameworkfor- consoleprojects 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. 
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
 mstest
- -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 - 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.
- --no-restore- Doesn't execute an implicit restore during project creation. 
- --sdk- Use MSTest.Sdk project style. 
- --test-runner <TEST_RUNNER>- The runner/platform for the test project. The possible values are: - VSTest- VSTest platform (Default).
- MSTest- Microsoft.Testing.Platform.
 
- --coverage-tool <COVERAGE_TOOL>- The coverage tool to use for the test project. The possible values are: - Microsoft.CodeCoverage- Microsoft Code Coverage (Default).
- coverlet- coverlet coverage tool.
 
- --extensions-profile <EXTENSIONS_PROFILE>- The SDK extensions profile when using Microsoft.Testing.Platform. The possible values are: - Default- Default extensions profile (Default).
- None- No extensions are enabled.
- AllMicrosoft- Enable all extensions shipped by Microsoft (including extensions with a restrictive license).
 
- --fixture <FIXTURE>- The fixture kinds to include in the test project. The possible values are: - None- No fixture methods.
- AssemblyInitialize- AssemblyInitialize fixture method.
- AssemblyCleanup- AssemblyCleanup fixture method.
- ClassInitialize- ClassInitialize fixture method.
- ClassCleanup- ClassCleanup fixture method.
- TestInitialize- TestInitialize fixture method.
- TestCleanup- TestCleanup fixture method.
 - Where multiple values are allowed. 
- -p|--enable-pack- Enables packaging for the project using dotnet pack. 
 mstest-class
- --fixture <FIXTURE>- The fixture kinds to include in the test project. The possible values are: - None- No fixture methods.
- AssemblyInitialize- AssemblyInitialize fixture method.
- AssemblyCleanup- AssemblyCleanup fixture method.
- ClassInitialize- ClassInitialize fixture method.
- ClassCleanup- ClassCleanup fixture method.
- TestInitialize- TestInitialize fixture method.
- TestCleanup- TestCleanup fixture method.
 - Where multiple values are allowed. 
 xunit
- -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 - 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.
- -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 - 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.
- -p|--enable-pack- Enables packaging for the project using dotnet pack. 
- --no-restore- Doesn't execute an implicit restore during project creation. 
page
- -na|--namespace <NAMESPACE_NAME>- Namespace for the generated code. The default value is - MyApp.Namespace.
- -np|--no-pagemodel- Creates the page without a PageModel. 
 viewimports, proto
- -na|--namespace <NAMESPACE_NAME>- Namespace for the generated code. The default value is - MyApp.Namespace.
blazor
- -f|--framework <FRAMEWORK>- Specifies the framework to target. - This template is available for .NET 8 or later. 
- --no-restore- Doesn't execute an implicit restore during project creation. 
- --exclude-launch-settings- Excludes launchSettings.json from the generated app. 
- -int|--interactivity <None|Server|Webassembly|Auto >- Specifies which interactive render mode to use for interactive components. The possible values are: - None- No interactivity (static server-side rendering only).
- Server- (Default) Runs the app on the server with interactive server-side rendering.
- WebAssembly- Runs the app using client-side rendering in the browser with WebAssembly.
- Auto- Uses interactive server-side rendering while downloading the Blazor bundle and activating the Blazor runtime on the client, then uses client-side rendering with WebAssembly.
 
- --empty- Omits sample pages and styling that demonstrate basic usage patterns. 
- -au|--auth <AUTHENTICATION_TYPE>- The type of authentication to use. The possible values are: - None- No authentication (Default).
- Individual- Individual authentication.
 
- -uld|--use-local-db- Specifies LocalDB should be used instead of SQLite. Only applies to - Individualauthentication.
- -ai|--all-interactive- Makes every page interactive by applying an interactive render mode at the top level. If - false, pages use static server-side rendering by default and can be marked interactive on a per-page or per-component basis. This option is only effective if the- -i|--interactivityoption isn't set to- None.
- --no-https- Turns off HTTPS. This option only applies if - Individualisn't chosen for the- -au|--authoption.
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod is generated instead of top-level statements.
web
- --exclude-launch-settings- Excludes launchSettings.json from the generated template. 
- -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 - 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 - --frameworkfor- consoleprojects earlier in this article.
- --no-restore- Doesn't execute an implicit restore during project creation. 
- --no-https- 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-httpsis used (but- no-httpsis ignored when an individual or organizational authentication setting is chosen for- --auth).
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
 mvc, webapp
- -au|--auth <AUTHENTICATION_TYPE>- 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 <INSTANCE>- The Azure Active Directory B2C instance to connect to. Use with - IndividualB2Cauthentication. 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 - IndividualB2Cauthentication.
- -rp|--reset-password-policy-id <ID>- The reset password policy ID for this project. Use with - IndividualB2Cauthentication.
- -ep|--edit-profile-policy-id <ID>- The edit profile policy ID for this project. Use with - IndividualB2Cauthentication.
- --aad-instance <INSTANCE>- The Azure Active Directory instance to connect to. Use with - SingleOrgor- MultiOrgauthentication. The default value is- https://login.microsoftonline.com/.
- --client-id <ID>- The Client ID for this project. Use with - IndividualB2C,- SingleOrg, or- MultiOrgauthentication. The default value is- 11111111-1111-1111-11111111111111111.
- --domain <DOMAIN>- The domain for the directory tenant. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- qualified.domain.name.
- --tenant-id <ID>- The TenantId ID of the directory to connect to. Use with - SingleOrgauthentication. The default value is- 22222222-2222-2222-2222-222222222222.
- --callback-path <PATH>- The request path within the application's base path of the redirect URI. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- /signin-oidc.
- -r|--org-read-access- Allows this application read-access to the directory. Only applies to - SingleOrgor- MultiOrgauthentication.
- --exclude-launch-settings- Excludes launchSettings.json from the generated template. 
- --no-https- Turns off HTTPS. This option only applies if - Individual,- IndividualB2C,- SingleOrg, or- MultiOrgaren't being used.
- -uld|--use-local-db- Specifies LocalDB should be used instead of SQLite. Only applies to - Individualor- IndividualB2Cauthentication.
- -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 - 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 - --frameworkfor- consoleprojects earlier in this article.
- --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 in Debug builds. 
- --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-httpsis used (but- no-httpsis ignored when an individual or organizational authentication setting is chosen for- --auth).
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
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. 
webapiaot
Creates a web API project with AOT publish enabled. For more information, see Native AOT deployment and The Web API (Native AOT) template.
- --exclude-launch-settings- Excludes launchSettings.json from the generated template. 
- -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 - Default value - 9.0 - net9.0- 8.0 - net8.0
- --no-restore- Doesn't execute an implicit restore during project creation. 
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
webapi
- -au|--auth <AUTHENTICATION_TYPE>- The type of authentication to use. The possible values are: - None- No authentication (Default).
- 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 <INSTANCE>- The Azure Active Directory B2C instance to connect to. Use with - IndividualB2Cauthentication. The default value is- https://login.microsoftonline.com/tfp/.
- -minimal|--use-minimal-apis- Create a project that uses the ASP.NET Core minimal API. Default is - false, but this option is overridden by- -controllers. Since the default for- -controllersis- false, entering- dotnet new webapiwithout specifying either option creates a minimal API project.
- -ssp|--susi-policy-id <ID>- The sign-in and sign-up policy ID for this project. Use with - IndividualB2Cauthentication.
- --aad-instance <INSTANCE>- The Azure Active Directory instance to connect to. Use with - SingleOrgauthentication. The default value is- https://login.microsoftonline.com/.
- --client-id <ID>- The Client ID for this project. Use with - IndividualB2Cor- SingleOrgauthentication. The default value is- 11111111-1111-1111-11111111111111111.
- -controllers|--use-controllers- Whether to use controllers instead of minimal APIs. If both this option and - -minimalare specified, this option overrides the value specified by- -minimal. Default is- false. Available since .NET 8 SDK.
- --domain <DOMAIN>- The domain for the directory tenant. Use with - IndividualB2Cor- SingleOrgauthentication. The default value is- qualified.domain.name.
- --tenant-id <ID>- The TenantId ID of the directory to connect to. Use with - SingleOrgauthentication. The default value is- 22222222-2222-2222-2222-222222222222.
- -r|--org-read-access- Allows this application read-access to the directory. Only applies to - SingleOrgauthentication.
- --exclude-launch-settings- Excludes launchSettings.json from the generated template. 
- --no-openapi- Turns off OpenAPI (Swagger) support. - AddOpenApiand- MapOpenApiaren't called.
- --no-https- Turns off HTTPS. No https launch profile is created in - launchSettings.json.- app.UseHstsand- app.UseHttpsRedirectionaren't called in Program.cs/Startup.cs. This option only applies if- IndividualB2Cor- SingleOrgaren't being used for authentication.
- -uld|--use-local-db- Specifies LocalDB should be used instead of SQLite. Only applies to - IndividualB2Cauthentication.
- -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 - 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 - --frameworkfor- consoleprojects earlier in this article.
- --no-restore- Doesn't execute an implicit restore during project creation. 
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod 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 <NAME>- The namespace for the generated code. Default is - MyApp.Namespace.
- -ac|--actions- Create a controller with read/write actions. Default is - false.
globaljson
- --sdk-version <VERSION_NUMBER>- Specifies the version of the .NET SDK to use in the global.json file. 
- --roll-forward <ROLL_FORWARD_POLICY>- 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. 
- --test-runner <TEST_RUNNER>- This option was introduced in .NET 10 SDK and specifies the test runner to use, either VSTest or Microsoft.Testing.Platform. The default is VSTest. 
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.
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 | [C#] | Web/MVC/SPA | 8.0 | 
| ASP.NET Core with React.js | react | [C#] | Web/MVC/SPA | 8.0 | 
| Blazor Server App | blazorserver | [C#] | Web/Blazor | 8.0 | 
| Blazor Server App Empty | blazorserver-empty | [C#] | Web/Blazor | 8.0 | 
| Blazor WebAssembly App Empty | blazorwasm-empty | [C#] | Web/Blazor/WebAssembly | 8.0 | 
 angular, react
Discontinued since .NET 8 SDK.
- -au|--auth <AUTHENTICATION_TYPE>- The type of authentication to use. - The possible values are: - None- No authentication (Default).
- Individual- Individual authentication.
 
- --exclude-launch-settings- Excludes launchSettings.json from 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- Specifies LocalDB should be used instead of SQLite. Only applies to - Individualor- IndividualB2Cauthentication.
- -f|--framework <FRAMEWORK>- Specifies the framework to target. - The following table lists the default values according to the SDK version number you're using: - 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.- 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 - --frameworkfor- consoleprojects earlier in this article.
- --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-httpsis used (but- no-httpsis ignored when an individual or organizational authentication setting is chosen for- --auth).
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
blazorserver
Discontinued since .NET 8 SDK.
- -au|--auth <AUTHENTICATION_TYPE>- 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 <INSTANCE>- The Azure Active Directory B2C instance to connect to. Use with - IndividualB2Cauthentication. 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 - IndividualB2Cauthentication.
- -rp|--reset-password-policy-id <ID>- The reset password policy ID for this project. Use with - IndividualB2Cauthentication.
- -ep|--edit-profile-policy-id <ID>- The edit profile policy ID for this project. Use with - IndividualB2Cauthentication.
- --aad-instance <INSTANCE>- The Azure Active Directory instance to connect to. Use with - SingleOrgor- MultiOrgauthentication. The default value is- https://login.microsoftonline.com/.
- --client-id <ID>- The Client ID for this project. Use with - IndividualB2C,- SingleOrg, or- MultiOrgauthentication. The default value is- 11111111-1111-1111-11111111111111111.
- --domain <DOMAIN>- The domain for the directory tenant. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- qualified.domain.name.
- --tenant-id <ID>- The TenantId ID of the directory to connect to. Use with - SingleOrgauthentication. The default value is- 22222222-2222-2222-2222-222222222222.
- --callback-path <PATH>- The request path within the application's base path of the redirect URI. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- /signin-oidc.
- -r|--org-read-access- Allows this application read-access to the directory. Only applies to - SingleOrgor- MultiOrgauthentication.
- --exclude-launch-settings- Excludes launchSettings.json from the generated template. 
- --no-https- Turns off HTTPS. This option only applies if - Individual,- IndividualB2C,- SingleOrg, or- MultiOrgaren't being used for- --auth.
- -uld|--use-local-db- Specifies LocalDB should be used instead of SQLite. Only applies to - Individualor- IndividualB2Cauthentication.
- --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-httpsis used (but- no-httpsis ignored when an individual or organizational authentication setting is chosen for- --auth).
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.
blazorwasm
- -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 - 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 - --frameworkfor- consoleprojects 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 (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.
 
- --authority <AUTHORITY>- The authority of the OIDC provider. Use with - Individualauthentication. The default value is- https://login.microsoftonline.com/.
- --aad-b2c-instance <INSTANCE>- The Azure Active Directory B2C instance to connect to. Use with - IndividualB2Cauthentication. The default value is- https://aadB2CInstance.b2clogin.com/.
- -ssp|--susi-policy-id <ID>- The sign-in and sign-up policy ID for this project. Use with - IndividualB2Cauthentication.
- --aad-instance <INSTANCE>- The Azure Active Directory instance to connect to. Use with - SingleOrgauthentication. The default value is- https://login.microsoftonline.com/.
- --client-id <ID>- The Client ID for this project. Use with - IndividualB2C,- SingleOrg, or- Individualauthentication in standalone scenarios. The default value is- 33333333-3333-3333-33333333333333333.
- --domain <DOMAIN>- The domain for the directory tenant. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- qualified.domain.name.
- --app-id-uri <URI>- The App ID Uri for the server API you want to call. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- api.id.uri.
- --api-client-id <ID>- The Client ID for the API that the server hosts. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- 11111111-1111-1111-11111111111111111.
- -s|--default-scope <SCOPE>- The API scope the client needs to request to provision an access token. Use with - SingleOrgor- IndividualB2Cauthentication. The default value is- user_impersonation.
- --tenant-id <ID>- The TenantId ID of the directory to connect to. Use with - SingleOrgauthentication. The default value is- 22222222-2222-2222-2222-222222222222.
- -r|--org-read-access- Allows this application read-access to the directory. Only applies to - SingleOrgauthentication.
- --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- SingleOrgaren't being used for- --auth.
- -uld|--use-local-db- Specifies LocalDB should be used instead of SQLite. Only applies to - Individualor- IndividualB2Cauthentication.
- --called-api-url <URL>- URL of the API to call from the web app. Only applies to - SingleOrgor- IndividualB2Cauthentication without an ASP.NET Core host specified. The default value is- https://graph.microsoft.com/v1.0/me.
- --calls-graph- Specifies if the web app calls Microsoft Graph. Only applies to - SingleOrgauthentication.
- --called-api-scopes <SCOPES>- Scopes to request to call the API from the web app. Only applies to - SingleOrgor- IndividualB2Cauthentication without an ASP.NET Core host specified. The default is- user.read.
- --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-httpsis used (but- no-httpsis ignored when an individual or organizational authentication setting is chosen for- --auth).
- --use-program-main- If specified, an explicit - Programclass and- Mainmethod will be used instead of top-level statements. Available since .NET SDK 6.0.300. Default value:- false.