Creating an ASP.Net MVC Project in Visual Studio 2015
Creating projects in Visual Studio 2015 is a guided process. This makes it a lot easier to create the correct project. The subsequent sections describe the process for creating an ASP.Net MVC project within Visual Studio 2015.
- Visual Studio 2015 installed on a machine matching the recommended system specifications set by Microsoft
A New Project
The “New Project” dialog is used to create a new project in Visual Studio 2015. This can be opened in multiple ways:
- Start Page > Start list > “New Project…”
- File Menu > New > Project
Clicking “New Project…” from the Start list or navigating to “Project…” from the File > New menu will open the “New Project” Dialog. (Note: The dialog will look slightly different depending on the features and licenses installed).
To make sure the project is set up and configured properly by Visual Studio 2015 pay close attention to the following items:
- .NET Framework version
- This drop-down should contain all of the .NET Framework versions installed and supported by Visual Studio 2015
- Select the version appropriate for your project. In this case, 4.6.2 is appropriate.
- Project Type
- Make sure to select the “ASP.NET Web Application (.NET Framework)” template to make sure you are not selecting a .NET Core version.
- This will name the ASP.NET MVC project. Name this according to established naming conventions of the organization. Generally it would use the following format: <Company Name>.<Project Name>.Web
- Select, Browse, or create a directory to contain the ASP.NET MVC project.
- Solution Name
- Name the solution file. If the “Create directory for solution” checkbox is checked, Visual Studio will create a directory for the solution named by the “Solution name” field. This solution directory contains all of the created projects. This is the default operation and is general considered best practice.
The next step is to click “OK”. The “New ASP.NET Web Application” dialog is displayed.
Within this dialog, make sure to choose the “MVC” template. An optional step is to include a Test project too. Then click “OK”.
Visual Studio will create the project based on the configuration settings. This may take a moment:
When the creation process is complete, the project readme will open and the Solution Explorer will contain the solution and project:
Enjoy your new project.