I can't find it for some reason, feeling a little dumb. How do I know? I'm using .net 4 with VS2010.
-
41So glad you asked this question :)– JenFeb 8, 2013 at 5:15
-
12for some reason I felt little dumb too ;)– ShihamMar 5, 2013 at 5:47
-
1This question is a duplicate in [stackoverflow][1]. [1]: stackoverflow.com/questions/3008704/…– kamaydSep 10, 2015 at 13:01
-
1This should be more obvious, and easier to find. None-the-less, a useful combination of answer-and-question.– JosephDoggieOct 3, 2018 at 15:44
-
Over a decade later your "dumb" question has 400 up votes. In 2021 I had the same "dumb" question. Just goes to say there are no "dumb" questions. Thank You for asking the question so I can find it here and not have to ask my own "dumb" question.– Aggie Jon of 87Nov 4, 2021 at 14:12
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.
-
13For me, it appears in web.config as ` <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />`. This is showing MVC version 5. I checked by the other two methods below. Feb 15, 2014 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. Jan 26, 2015 at 20:26
-
7Note that as of MVC6 you will find it in project.json under
dependencies
->"Microsoft.AspNet.Mvc"
– devqonDec 3, 2015 at 7: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
-
20I prefer this method, because sometimes the web.config doesn't list the System.Web.MVC assembly. Jan 7, 2014 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.– FaraxJul 17, 2015 at 2: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.– RamuMay 18, 2016 at 15:12
typeof(Controller).Assembly.GetName().Version
Gives the current version programmatically.
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.
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
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.
-
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 haacked.com/archive/2010/12/05/…. It's very easy to install and then run :) Feb 15, 2014 at 21:23 -
6
-
@mac10688 nuget.org/packages/MvcDiagnostics and haacked.com/archive/2010/12/05/… Mar 4, 2016 at 17:39
-
3
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.
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.
In Mvc You can do it by opening Web.config file it comes under bottom of your project file