MVC Versions and Version History - Which version am I using
In order to detect which version of MVC a particular project is built with there are various techniques as follows
Check the MVC DLL version
a) Open the project in Visual Studio
b) Expand the References in the MVC Project and find the System.Web.Mvc DLL
c) Right click on it and click properties
d) Observe the Runtime version and Version properties as below
The above is from a Katmaid project which I know be be MVC 4
Another example below from my Paxium project which is confusing as it shows a Runtime version of 4 but a Version of 5
In actual fact if you look at this article
And look at the hints in the properties window you will see that the Version is the DLL version and the Runtime version is the Version of the .Net runtime this assembly was compiled against as below
View The MVC DLL In Assembly Explorer
a) Open the project in Visual Studio
b) Expand the References in the MVC Project and find the System.Web.Mvc DLL
c) Right click on it and click view in Assembly Explorer
d) Observe the Results which contains lots of indicators as to which version it is
See below for Katmaid which is MVC 4
See below for Paxium which is MVC 5
View The MVC DLL In Object Browser
a) Open the project in Visual Studio
b) Expand the References in the MVC Project and find the System.Web.Mvc DLL
c) Right click on it and click view in Object Browser
d) Observe the Results which contains lots of indicators as to which version it is
See below for Katmaid which is MVC 4
See below for Paxium which is MVC 5
View The MVC DLL Properties in Windows Explorer
a) Open Windows Explorer and navigate to the bin folder and find the System.Web.Mvc DLL
c) Right click on it and click properties
d) Observe the Results which contains lots of indicators as to which version it is
See below for Katmaid which is MVC 4
See below for Paxium which is MVC 5
View The MVC DLL Properties in .Net Reflector
a) Open Windows Explorer and navigate to the bin folder and find the System.Web.Mvc DLL
c) Right click on it and select browse with .Net Reflector
d) Observe the Results which contains lots of indicators as to which version it is
See below for Katmaid which is MVC 4
See below for Paxium which is MVC 5
In terms of what happens when you open a particular version of Visual Studio and create a new MVC project then the default should be certain versions but there may be options to create different versions.
The version history is as follows
MVC Version | Visual Studio | .NET Framework | Released Date | Features |
---|---|---|---|---|
MVC 1.0 | VS2008 | .Net 3.5 | 13-Mar-2009 |
|
MVC 2.0 | VS 2008, | .Net 3.5/4.0 | 10-Mar-2010 |
|
MVC 3.0 | VS 2010 | .Net 4.0 | 13-Jan-2011 |
|
MVC 4.0 | VS 2010 SP1, VS 2012 |
.NET 4.0/4.5 | 15-Aug-2012 |
|
MVC 5.0 | VS 2013 | .NET 4.5 | 17-oct-2013 |
|
MVC 5.2 - Current | VS 2013 | .NET 4.5 | 28-Aug-2014 |
|
It may also be possible to prove we are in version 4 for example by trying to use a version 5 feature and seeing that it does not work
Also see https://stackoverflow.com/questions/51390971/im-lost-what-happened-to-asp-net-mvc-5
MVC 3
Below is a screenshot showing an MVC project created by setting up a virtual machine with Visual Studio 2012.
Interestingly such a setup allows you to create an MVC 3 or MVC 4 project when creating a new project as below