Reputation:
I was trying to create an empty MVC project in VS 2022 but I couldn't find true project type. When I chose "Asp.NET Web Application (Model-View-Controller)", it wasn't empty. When I chose "Asp.NET Web Application", it wasn't a MVC project. Which project type should I choose to create an empty MVC project?
Upvotes: 1
Views: 5579
Reputation: 1
Step 1 ASP.NET Web Application (.NET Framework)--- Project templates for creating ASP.NET applications. You can create ASP.NET Web Forms, MVC, or Web API applications and add many other features in ASP.NET
Step 2 give your project name -- Location -- select Framework
Step 3 Select Empty Project Template --> Add Folders and Core References as -- MVC
Upvotes: 0
Reputation: 29
In Visual Studio 2022 Installer, below the ".NET Framework 4.8 targeting pack", there is a component named ".NET Framework project and item templates" and by default, this component was not selected. selected and installed it.
Upvotes: 3
Reputation: 2110
You have hit two correct choices.
As said in the projects' descriptions, the ASP .NET Web App Empty really is empty and you need to implement MVC yourself.
The default Asp.NET Web Application (Model-View-Controller) project includes example Views and Controllers, which you can always delete or modify if want to.
Upvotes: 2