ClickOnce complains: “You cannot start application from this location because it is already installed from a different location.”

clickonce

I have a ClickOnce install of a .NET 4.0 application. I got this error:

You cannot start application from this location because it is already installed from a different location

I got it by doing the following:
* I create my deployment and zip it.
* Go to an install computer and unzip and install.
* Create the next version and zip that up.
* Now on my install computer, if I unzip to a different location and try to run setup, I get the above error.

I would be perfectly fine with having my application completely uninstall previous versions and then install the latest. Would not these types of errors occur all the time where a user installs from a DVD once and later gets a new version via a downloaded ZIP file?

Best Answer

The deployment URL is part of the identity of the application. If you install it from one location when it starts, you need to install updates from the same location. It does this even if you don't specify a deployment provider in the manifest (as noted in the article referenced by Johnny) -- it just sets it to the place you first install it from.

The only way around this that I know of is to publish the application to a webserver as an online-only application. (Might also work from a file share, but I don't remember.)

Related Topic