So for my first LightSwitch related post I want to talk about a little problem/bug with a HTML5 preview project. Last week I wanted to deploy my application witch was no problem BUT when I updated the application all the clients had to uninstall and re-install the application because they got this error:
The following error occured while checking for updates: ‘Cannot update application, the installed application and update candidate differ in certicate/signature state’.
It was the first time I got this error updating one of my applications and also the first time I update a HTML5 application. So I started searching a solution for this and after a few days of googling I found the answer!
The problem is that the .XAP file is not being signed when the publish wizard is run.
During the publish process 2 .XAP files are being created in the following folders:
The .XAP in the first folder is not being signed. The .XAP in the second folder is signed. The second folder is where published files were created for VS 2012 and should not be getting published or created (another problem).
The workarounds for the problem is:
Perform the publish then overwrite the .XAP file located in the published web app’s Client\Web folder with the .XAP file located in the Web folder
copy from “Default Web Site/MyApp/Web/MyApp.Client.xap”
to “Default Web Site/MyApp/Client/Web/MyApp.Client.xap”)
Thank you Robert Schoen for the perfect explanation and the solution!