Showing the Version for an MVC App

Technorati Tags: ,,

The primary MVC (Model-View-Controller) application that I’m working on is called KarlZMvc resulting in a dll called KarlZMvc.dll. To get the version output on my Site.Master page I need to include the following line:

Code Snippet
  1. <%= typeof(KarlZMvc.MvcApplication).Assembly.GetName().Version.ToString() %>

I tried all sorts of combinations with the GetExecutingAssembly, or calling, etc. But none seemed to work. This is with ASP.NET MVC 2 using Visual Studio 2010 Beta 2.

Leave a Comment

You must be logged in to post a comment.