Visual Studio 2022 - Where is the RouterConfig.cs and Global.asax in MVC project?

Viewed 747

I am new to Visual Studio and ASP.NET and I am watching a tutorial by Mosh Hamedani on MVC development. The tutorial is a couple of years old, but when he creates a new ASP.NET MVC project, it has an App_Start folder with a RouterConfig.cs file, and also a Global.asax file. Both of these things are missing from a project created in Visual Studio 2022, and thus the tutorials are failing because of lack of proper routing.

Is there a way to get Visual Studio to create this older project setup, or to get access to these files and folders, or will this tutorial be totally useless to me?

2 Answers

You have to choose: Web Application ASP.NET (.NET Framework) And then, MVC or API web

you can just add new folder in your project for routeconfig.cs for the routing purpose and for global.asax can be added manually .net core stillhave some basic framework function and for further info you can go to microsoft official site .net docs.

Related