I can't find it for some reason, feeling a little dumb. How do I know? I'm using .net 4 with VS2010.
-
40So glad you asked this question :) – Jen Feb 08 '13 at 05:15
-
12for some reason I felt little dumb too ;) – Shiham Mar 05 '13 at 05:47
-
1This question is a duplicate in [stackoverflow][1]. [1]: http://stackoverflow.com/questions/3008704/how-to-determine-the-current-version-of-asp-net-mvc – kamayd Sep 10 '15 at 13:01
-
1This *should* be more obvious, and easier to find. None-the-less, a useful combination of answer-and-question. – JosephDoggie Oct 03 '18 at 15:44
10 Answers
Open web.config file and find the System.Web.Mvc assembly definition:
assembly="System.Web.Mvc, Version=3.0.0.0 ..."
It's an MVC3 as you see. Via web you can use MvcDiagnostics which is similar to phpinfo()
functionality in PHP.
- 10,131
- 4
- 34
- 65
-
13For me, it appears in web.config as `
`. This is showing MVC version 5. I checked by the other two methods below. – Stephen Hosking Feb 15 '14 at 21:33 -
35
-
This isn't always present in all MVC projects; it may be version dependent and Visual Studio dependent; it is possibly project-dependent as well. – JosephDoggie Jan 26 '15 at 20:26
-
7Note that as of MVC6 you will find it in project.json under `dependencies` -> `"Microsoft.AspNet.Mvc"` – devqon Dec 03 '15 at 07:46
Select the System.Web.Mvc assembly in the "References" folder in the solution explorer. Bring up the properties window (F4) and check the Version
- 19,511
- 7
- 54
- 90
-
20I prefer this method, because sometimes the web.config doesn't list the System.Web.MVC assembly. – Shaun Luttin Jan 07 '14 at 21:04
-
5I was always confused about the runtime version and the Version. Was not sure which one was the one I was supposed to look at. – Farax Jul 17 '15 at 02:02
-
1@Farax Runtime version is .net CLR version under which the assembly is compiled. Its helpful to let you know the minimum .net runtime version you can use / to the min version you can down grade your project so that the assembly still works. – Ramu May 18 '16 at 15:12
Another solution is to search for mvc in nuget (right click on your MVC project in visual studio and select "Manage Nuget Packages").
- 1,019
- 9
- 23
typeof(Controller).Assembly.GetName().Version
Gives the current version programmatically.
- 23,237
- 9
- 76
- 129
- 1,510
- 15
- 21
I had this question because there is no MVC5 template in VS 2013. We had to select ASP.NET web application and then choose MVC from the next window.
You can check in the System.Web.Mvc dll's properties like in the below image.
- 965
- 13
- 23
I chose System.web.MVC from reference folder and right clicked on it to go property window where I could see version of MVC. This solution works for me. Thanks
- 31
- 4
Well just use MvcDiagnostics.aspx It shows lots information about current MVC instalations, and also helps with debuging. You can find it in MVC source or just Google for it.
- 47
- 1
-
1Other answers are good for directing people to the right part of the solution (web.config, or the `References`). This answer shows us how to see it at runtime. `MvcDiagnostics` is not part of a standard MVC installation, but it's worth installing (with nuget). See http://haacked.com/archive/2010/12/05/asp-net-mvc-diagnostics-using-nuget.aspx/. It's *very* easy to install and then run :) – Stephen Hosking Feb 15 '14 at 21:23
-
5
-
@mac10688 https://www.nuget.org/packages/MvcDiagnostics and http://haacked.com/archive/2010/12/05/asp-net-mvc-diagnostics-using-nuget.aspx/ – MemeDeveloper Mar 04 '16 at 17:39
-
2
In Solution Explorer open packages.config and find Microsoft.AspNet.MVC:
package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461"
From the above we can see it's an Asp.Net MVC 5.2.3 Version.
Moreover packages.config file also helps us to track all the installed packages with their respective versions.
- 554
- 5
- 18
Navigate to "C:\Program Files (x86)\Microsoft ASP.NET" folder. You will see "ASP.NET MVC 4" or something like that. To know detail navigate to "C:\Program Files (x86)\Microsoft ASP.NET{your MVC version}\Assemblies\System.Web.Mvc.dll" Right click and see the version.
- 440
- 5
- 10
In Mvc You can do it by opening Web.config file it comes under bottom of your project file
- 19
- 7