How to determine the current version of ASP.NET MVC?
Open the packages.config in your solution explorer..
Then look for ASP.NET MVC package ID, as follows:
id="Microsoft.AspNet.Mvc" version="5.2.2" targetFramework="net452"
- Go to your References folder
- Look for
System.Web.Mvc
- Right Click on it
- Click Properties
- Look at the Version property.
This is most likely your version but the GAC may play a role in messing you around.
At runtime-
string mvcVersion = typeof (Controller).Assembly.GetName().Version.ToString();
At design time-
- Go to your reference folder
- look for system.web.mvc
- Right Click on it
- Click Properties Look at the Version property
.
Via Reflection:
typeof (Controller).Assembly.GetName().Version