Reputation: 443
I had a website project which I converted to a web application, now I am trying to display dll version information of my web application. I tried
Assembly.GetExecutingAssembly() which returns App_Web_ehipvj25, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly.GetCallingAssembly() which returns system.web assembly
Assembly.GetEntryAssembly() which returns null
And the actual version info which comes from AssemblyInfo.cs
, is 2.0.*
when I created a new application and tried getExecutingAssembly
method it worked correctly and showed myapplicationname Version=2.0.1213.3432 as result but in the application which converted from website results 0.0.0.0 what action might have caused this situation?
Upvotes: 0
Views: 301
Reputation: 443
i figured out how to get version info
System.Reflection.Assembly.Load("assemblyname").GetName().Version.ToString()
Upvotes: 1