Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahuldass/1fd9332c87e0777d3074 to your computer and use it in GitHub Desktop.
Save rahuldass/1fd9332c87e0777d3074 to your computer and use it in GitHub Desktop.
View version of MVC 4 or later used in project #mvc4

###View version of MVC 4 or later used in project

In runtime

public class HomeController : Controller
{
    public string Index()
    {
        // use to see version of mvc used in project
		return typeof(Controller).Assembly.GetName().Version.ToString();
    }
}

In design time

Inside Project go to References and then right-click on System.Web.Mvc and select properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment