I use this code to get my version of programs:
public string progVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
However, it does not always seem to capture the version I expect. I really don’t understand how it works completely or what it does.
I think this is passed because I run my program from another program, then it seems to grab the version of the program that ran it, or "GetExecutingAssembly ()" I assume links to the program that executed my programs, for example:
System.Diagnostics.Process.Start(my_programs_path);
Is there a more reliable way to get the version of a program for a real program at the time I ask for it?
Perhaps even run my program without leaving any path, as if the user himself had just launched it.
Thanks for any help!
source
share