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.
MVC with ASP.NETASP.NET gives you a powerful, patterns-based way to build dynamic websites using the MVC pattern that enables a clean separation of concerns.
ASP.NET MVC 4 is a framework for developing highly testable and maintainable Web applications that follow the Model-View-Controller (MVC) pattern. The framework encourages you to maintain a clear separation of concerns— views for UI, controllers for handling user input, and models for domain logic.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With