React with ASP.NET Core in Visual Studio
Visual Studio ships a project type that creates a React front end and an ASP.NET Core back end in a single solution, wired together for a smooth F5 experience. This guide explains what you get, how it works, and how to take it to production.
What is the "React and ASP.NET Core" project type?
It creates a Visual Studio solution with two projects:
- A client project (
.esproj): a React app built and served by Vite, using the Visual Studio JavaScript project system. - A server project (
.csproj): an ASP.NET Core Web API that serves data, and in production also serves the built React files.
Press F5 and Visual Studio starts both: the API and the Vite dev server (with hot module replacement) so edits appear instantly in the browser.
STEP 1
Prerequisites
Workloads, Node.js and the .NET SDK.
STEP 2Create the project
The new project wizard, step by step.
STEP 3Solution anatomy
Files, project references, dev proxy.
STEP 4Run & debug
F5, launch profiles, debugging both sides.
STEP 5Call the API
An end-to-end to-do example.
STEP 6Build & deploy
Publish and host on Azure.
STEP 7Troubleshooting
Proxy errors, ports, certificates.
Template details change between releases. Names, defaults (JavaScript or TypeScript, Vite versions,
SPA proxy wiring) and file contents evolve with Visual Studio updates. Treat the snippets here as a guide and
compare them with what your Visual Studio 2026 installation generates.