Hello All,
This is one of the common questions which we see often in various forums. Even I have struggled to find the exact version of the MVC earlier. It becomes more tricky as Micrososft releases new MVC versions at regular interval. Earlier each new release was a major release with release number like MVC 1, MVC 2, MVC 3, MVC 4,MVC 5 but recently we see new releases with minor version like MVC 5.1, MVC 5.2 and even now with build number like the upcoming one ASP.NET MVC 5.2.4 (while previous one 5.2.3). It also become more problematic sometimes when we upgrade the mvc version.
Note – The version of a software is normally denoted by four number separated by dots as x.x.x.x which is as Major.Minor.Build.Revision.
There are many ways to find the specific version. We will discuss few common ones here
1- The simplest way to open Web.Config file and look for System.Web.Mvc, you could see similar as
Here 5.2.3 is the current version.
2- We can check the references in the solution explorer, find out the System.Web.Mvc, right click on it and select properties as
3- If your project contain packages.config (normally every project has it), then we can find the version from here easily. Search for Microsoft.AspNet.Mvc and you should find something as
4- We can get the MVC version programatically based on the need as
5- There is a nuget package available which provides lots of useful information named MVCDiagnostics which adds a page named mvcdiagnostics.aspx which displays other useful information along with MVC version. This package could be very useful if you are upgrading to new version and facing issues. The page looks as
I have not included the complete page for brevity but lot more details are availble on this page.
Package can be installed from here
This is quick post on of the common questions. Hope you find it useful.
Cheers,
Brij