Adding React to an existing ASP.Net MVC project

Part 1: setting up the project

Paddy Guest
8 min readJul 12, 2021
Photo by Antonio Batinić on Pexels

I am writing this to help others, as all the articles and tutorials I found on this topic were missing some key steps relevant to my scenario. After a lot of trial and error, I got the project to work. Hopefully, once this series is complete it will cover many issues that you may encounter when attempting to use React in existing projects. This article assumes prerequisite knowledge of developing ASP.Net projects, and developing React code in standalone projects.

First things first, we need a project. I am creating a new one for the purposes of this article. But you can start with an existing project. Please note, if you are using “Areas” within your project, then additional routing configuration will be required, and I will cover this in a later part.

If you are working with an existing project, you can skip straight to step 6.

This is using Visual Studio, rather than Visual Studio Code, as I manage all my ASP.Net projects in Visual Studio. You can download the free community edition of Visual Studio from here.

  1. Create a new project

2. Select ASP.NET Web Application (.NET Framework) and click “Next”

--

--

Paddy Guest
Paddy Guest

Written by Paddy Guest

I am a software developer, business manager, amateur mixologist and cooking enthusiast.