I want to open up an existing instance if my program is already running only if its running the same version. I noticed that this question was asked for only the the name exists, but what if the version is older, I just want to notify the user that an older version is still running, please remove older version before starting this version.
The other link is this one:
Return to an already open application when a user tries to open a new instance but they don’t talk about closing an instance if an older or newer version is detected.
In the easiest way, make check like this:
But more complex thing could be like this:
Good luck!
P.S.:”But be careful – “GetAssemblyName” works only for managed code assemblies, so make it in try-catch wrap.”