⚛ React + ASP.NET Core Guide

2. Create the project

Use the new project wizard in Visual Studio.

  1. Start Visual Studio and choose Create a new project.
  2. Search for React and select the React and ASP.NET Core template (a JavaScript template). Some Visual Studio versions word it as "ASP.NET Core with React".
  3. Choose Next, then give the project a name, for example ReactWithAspNet, and a location.
  4. On the additional information page, choose the framework (.NET 10) and any options offered, such as HTTPS and Docker support.
  5. Choose Create.

The first load can take a few minutes while npm restores the client's dependencies. Watch the Output window and the npm node in Solution Explorer.

Command-line alternative: the .NET CLI also has SPA templates. Run dotnet new list react to see what your installed SDK offers. The Visual Studio template described here is the one with a separate .esproj front end.

Recommended first checks