Advertisement
Willcode4cash

Determine ASP.NET MVC project version

Jun 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. // In AssemblyInfo.cs
  2.  
  3. [assembly: AssemblyVersion("1.0.*")]
  4. [assembly: AssemblyFileVersion("1.0.*")]
  5.  
  6. // Get the assembly version of the HomeController
  7. // Display wherever you want in the application
  8.  
  9. var mvcApplicationVersion = typeof(HomeController).Assembly.GetName().Version.ToString(3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement