Strange one here. My MVC Web Application's version number is not printing correctly to my view according to what is set in AssemblyInfo.cs
. The definition I have set in set AssemblyInfo.cs
is '1.0.232.0
'.
I have tried multiple methods in order to print it:
<%= System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()%>
(results 0.0.0.0)
<%= System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString()%>
(results in 2.0.0.0, which is set nowhere in my project.)
<%= typeof(HomeController).GetType().Assembly.GetName().Version.ToString()%>
(results in 2.0.0.0)
This leads me to believe that it simply must not be picking up my AssemblyInfo.cs file? This is also the case if I attempt to use the "Publish" button to publish to IIS on our development server.
Any ideas? Perhaps I'm using the wrong statement to fetch the version number? :\
Thanks guys.