Assembly web = Assembly.GetExecutingAssembly();
AssemblyName webName = web.GetName();
string myVersion = webName.Version.ToString();
Then, to set the assembly version, simply go to Properties/AssemblyInfo.cs, as usual.
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]
No comments:
Post a Comment