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"


  1. Go to your References folder
  2. Look for System.Web.Mvc
  3. Right Click on it
  4. Click Properties
  5. 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

Tags:

Asp.Net Mvc