MVC4 requirements:
Running on Windows
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
Server Operating System:
- Windows Server 2003
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
Development tools: Visual Studio 2012, Visual Studio 2010 SP1, Visual Web Developer 2010 Express SP1.
Install MVC4
Install the MVC4 component.
Visual Studio 2012 itself contains MVC4 and does not require installation.
For Visual Studio 2010, Web Platform Installation: http://www.microsoft
. Com/web/gallery/install. aspx? Appid = MVC4VS2010
Executable package: http://go.microsoft.com/fwlink? LinkID = 243392.
Install MVC4 on the server
The MVC4 environment on the server is the same as that on the client.
If MVC4 is not installed on the server, can programs developed with MVC4 run? The answer is yes. All necessary components of MVC4 are included in the bin folder. It's no wonder that the volume is so large. In fact, the MVC4 Running Environment Program on the server can be completely deleted when deployed on the server.
Create an MVC4 application.
Another famous MVC Music Store
1. Open vs2012, select a file, and create a project.
2. Select Visual C #-> Web-> ASP. Net MVC4 Web Application
3. Enter "MvcMusicStore" as the name and click "OK.
New ASP. net mvc 4 Project dialog box
Select Template
- Null: it is an empty project. The basic components and directory structure are still available.
- Basic: A minimum template with the basic structure of folders, css, and MVC applications.
- Internet applications: a commonly used template that is rich enough to support account management (depending on ASP. NET Membership). Once created, it can be run directly.
- Internet applications: Same as Internet applications, they only use Windows accounts.
- Mobile applications: templates for mobile devices, including mobile visual effects, touch controls, and Ajax navigation.
- Web api: a template for HTTP services.
View Engine
There are two default methods: Razor and the traditional aspx. aspx are the ones used by the original asp.net; Razor. Other view engines are supported here, and you can even write your own view engine. In fact, there is no need to use other engines. The Razor is sharp and clever enough.
Test Unit
This is used to create Test units. By default, only Visual Studio Unit Test is used in the following Test framework. However, Visual Studio Unit Test is available only in Visual Studio 2012 Professional or later versions. If it is Visual Studio 2012 Standard Edition or Express, You need to download and install NUnit, MbUnit, or xUnit extension.
Note: It is best to create a unit test project when creating a project.
Click OK to create a project.