20
votes

I have just installed MVC 4 and am looking at using it with VS 2010. I notice that by default when creating a project the .NET framework is 4.0, yet the example code I am looking at uses framework 4.5. If I want to utilise all the features of MVC 4 do I need to install framework 4.5, or should 4.0 be enough?

EDIT : Seems like I will go with 4.0, although will 4.5 be the default framework in VS2012? If so, I would probably prefer to install that to save having to make framework changes later.

4

4 Answers

22
votes

Look at the MVC4 download page. There is a requirements section saying:

Supported operating systems: Windows 7, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

.NET 4, ASP.NET 4, Visual Studio 2010 or Visual Web Developer 2010 are required to use certain parts of this feature.

13
votes

You need .NET 4 and Visual Studio 2010 at a minimum but CAN use more features with ASP.NET 4.5.

VS2010 will only support framework 4 features, and thus async/await will not be supported. For those features you need ASP.NET 4.5. This applies to the Web API as well for example this requires 4.5: http://blogs.msdn.com/b/henrikn/archive/2012/03/03/async-mashups-using-asp-net-web-api.aspx

A standard controller/view scenario in MVC4 will work in VS2010 on ASP.NET 4.

1
votes

Undoubtedly no need to install 4.5 (mvc4-release-notes). ASP.NET MVC 4 is available for framework version 4.0 as well 4.5.

1
votes

If you're just writing an app as you go then just write and compile. That will tell you if you have what you need. Tho:

Utilise all the features of MVC

does not sound very user-centric ;)

Also do yourself a favor and deploy to IIS as your development server NOT Cassini or whatever its called nowadays.