I want to know if there is a way to get the directory of the previous version (the last version older than the current version) of ClickOnce Application?
Something like this? Assembly.GetExecutingAssembly().Location
The above will get the directory of whatever version that is currently running. I want to get the directory of the version older than this.
There is a file in the directory of the older version that I’ll need in a new version. So, I want to know if there is a way to find out.
This might be helpful ?? When we try to uninstall the ClickOnce application from control panel, it asks if you want to revert back to the last version or remove the application completely. Since it says it has the capability to revert back to the last version, there should be the directory of the last version stored somewhere on the new version, right? I want to know that directory path.
Any help will be greatly appreciated :)
There is no way to retrieve that information.
If there is some kind of information that you need the next version to have access to, the best way to handle it is to store it in Application Data, so it will be safe from ClickOnce updates.