purpleflash
May 14th, 2009, 05:35 AM
Using this code:
Assembly myAssembly = Assembly.GetExecutingAssembly();
AssemblyName myAssemblyName = myAssembly.GetName();
textBox2.Text = "Client Version " + myAssemblyName.Version.ToString();
to get he version of my application and set it's value to a textbox.
My app is set up to auto-increment version #'s, and currently is 1.0.0.25
In the debgger, "myAssembly" return the application itself (as is expected) however it always returns 1.0.0.1 for the version. Always.
What's up and what do I need to change?
Using .Net 3.5SP1 on XP
Assembly myAssembly = Assembly.GetExecutingAssembly();
AssemblyName myAssemblyName = myAssembly.GetName();
textBox2.Text = "Client Version " + myAssemblyName.Version.ToString();
to get he version of my application and set it's value to a textbox.
My app is set up to auto-increment version #'s, and currently is 1.0.0.25
In the debgger, "myAssembly" return the application itself (as is expected) however it always returns 1.0.0.1 for the version. Always.
What's up and what do I need to change?
Using .Net 3.5SP1 on XP