ClickOnce complains: "You cannot run the application from this location because it is already installed from another location."

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

You cannot run the application from this location because it is already installed from another location

I received it by following these steps: * I create my deployment and button it. * Go to the installation computer and unzip it and install. * Create the next version and button it. * Now on my installation computer, if I unzip to another location and try to start the installation, I get the above error.

I would be fine if my application would completely uninstall previous versions and then install the latest version. Won't these types of errors occur all the time when a user installs from a DVD once and later, receives a new version through a downloaded ZIP file?

+4
source share
3 answers

The deployment URL is part of the application identifier. If you install it from one place when it starts, you need to install updates from the same place. He does this even if you do not specify the deployment provider in the manifest (as indicated in the article referenced by Johnny) - he simply installs it in the place where you first installed it.

, , - - -. ( , .)

+6

ClickOnce , , Dev QA, :

makecert -r -pe -n "CN=MyApp Q1" -sv MyApp-Q1.pvk MyApp-Q1.cer -b 06/01/2016 -e 12/31/2099

powershell, , :

Get-PfxCertificate -FilePath .\MyApp-Q1.pfx

csproj :

<ProductName>MyApp - Q1</ProductName>
<InstallUrl>\\my\installation\link</InstallUrl>
<ManifestCertificateThumbprint>9D4BF3492523A7D45A835542F7E1CB27ED53573B</ManifestCertificateThumbprint>
<ManifestKeyFile>../Certificates/MyApp-Q1.pfx</ManifestKeyFile>

, , , Visual Studio "", . . MSDN (. Https://docs.microsoft.com/en-us/visualstudio/ide/how-to-sign-application-and-deployment-manifests?view= vs-2017) . ClickOnce (. https://docs.microsoft.com/en-us/visualstudio/deployment/walkthrough-manually-deploying-a-clickonce-application?view=vs-2017).

0

If you encounter this problem, the application is already installed, you can go to the control panel, delete the existing application and install / publish your application.

It worked for me.

Thank you Rahkesh

0
source

All Articles