How to find out what causes the generic 'Application cannot be started. Contact the application vendor.' ClickOnce errors?

Viewed 27285

I have a .NET application that is published using ClickOnce. For the most part, everything works well with this procedure, but every once in a while, a user will get an error that throws up the message shown below instead of opening the program:

Application cannot be started. Contact the application vendor.

enter image description here

I found the Troubleshooting Specific Errors in ClickOnce Deployments page on MSDN which states (in the Additional Errors section):

Error message

Application cannot be started. Contact the application publisher.

Cannot start the application. Contact the application vendor for assistance.

Description

These are generic error messages that occur when the application cannot be started, and no other specific reason can be found. Frequently this means that the application is somehow corrupted, or that the ClickOnce store is corrupted.

While it's not an exact match for the error message that is displayed for this problem, I think that it is close enough to fit into the above category of errors. Now the fix for this problem is to simply delete all of the ClickOnce user settings that are stored in...

C:\Users\USERNAME\AppData\Local\Apps\2.0  

... so the problem is bearable, but my question is this:

What can I do to find out what is causing these generic errors so that I can stop them from occurring?

2 Answers

If your project is 64 bit and you try to copy it to \windows\system32, you get this error. Moving the .exe to \windows\syswow64 fixes the problem.

Related