I had the same problem as most of you. It will always show 1.0.0.0 if you did not enter manually and did not update the assemblyInfo.cs file to the version you wanted to display. I think that we wanted to show the version number of the edition in the project properties, but this does not seem to be an option (from what I read).
I'm not sure that once, when these comments were made, it existed, but now in the assemblyinfo.cs file there is a way to do this automatically. I also did not like to update them manually with each publication.
//You can specify all the values or you can default the Build and Revision Numbers//by using the '*' as shown below://[assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.*")]
This * automatically increases with every post. It will not be the same as the publication number that you see in the project properties, but it is definitely increasing, and certainly better than doing it manually.
Then you have several options to display as above. I personally used this, which I found on another site
Version version = Assembly.GetExecutingAssembly().GetName().Version; lblRevision.Text = String.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
blind Skwirl Jul 31 '18 at 22:13 2018-07-31 22:13
source share