I have a Wpf application where I want it to deploy over remote servers. Previously I used VS2010, So It would be easy to create setup/ .msi files and deploy over other machines.
Currently I have VS2012. It doesn't have setup deployment option. Also, I read about clickonce application deployment method to deploy my application.
I tried an approach but It doesn't properly install the application in local itself. The application shortcut launching the application for the first time (rarely second time too). Next time, It throws me exception like
"Cannot start application". Application cannot be started. Contact the application vendor
Error details are:
ERROR DETAILS
Following errors were detected during this operation.
* [29-01-2014 11:32:48] System.Deployment.Application.DeploymentException (Activation)
- Activation failed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.IO.FileNotFoundException
- The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
Help me on this?
I've had this problem before... I can't tell you what causes it, but you'll be glad to hear that the solution is fairly painless. When you get an error message stating that the 'Application cannot be started. Contact the application vendor.', do the following to fix it:
Delete the application history for that application
ClickOnce applications are installed into the following path:
Please note that the
Apps
folder is hidden by default, so you'll need to show hidden files and folders in the Windows Explorer Folder Options dialog. In this folder is a folder namedData
. This contains the user settings and should not be deleted.Other folders in this folder will contain the application history and should be deleted... these folders have random names like 'AP3HP63D.KQT'. It is important that you view the contents before you delete them.
Folders inside this next level also have semi random names although they use the first and last few letters of the solution folders that they represent... an example: Midas.Models:
So, if you are trying to delete the version download history for your application, please ensure that the inner folders are the correct ones. Having located the correct 'outer folder' (e.g. 'AP3HP63D.KQT'), you can simply delete it and re-download the latest version of the application.