I have an HtmlHelper extension method in an assembly separate from my MVC application assembly. Within the extension method I would like to get the version number of the MVC app
Just in case anyone comes across this, here is what worked for me (MVC5 VS2013). Enter straight into the view:
@ViewContext.HttpContext.ApplicationInstance.GetType().BaseType.Assembly.GetName().Version.ToString();