I'm still working on the problem described here, trying to get ClickOnce to work from Visual Studio 2008. I originally assumed the problem was related to the fact that the application I was deploying was upgraded from 2005. But that's not the case. I created a new VS2008 application and deployed it with the same result.
I've tried (I think) every possible combination of publish settings (except signing the manifest, which I don't need to do because I'm deploying over an intranet). Most users get the same message.
Cannot continue. The application is improperly formatted. Contact the application vendor for assistance.
I got another developer who has VS2008 to try opening the application, and it worked for him. Others who haven't upgraded from 2005 get the error message. I'm targeting 3.5, and the 3.5 framework is included in the prerequisites.
The users already have the 3.5 framework installed. I'm wondering if maybe it's installed incompletely or incorrecly. Can anybody think of any other reason users who don't have VS2008 installed wouldn't be able to run a VS2008-generated ClickOnce application?
For the "Application validation did not succeed. Unable to continue." error, here's what I did: looking at the ClickOnce error log, I saw the message
Strong name signature not valid for this assembly.
In my case, this error was related with the Microsoft.mshtml.dll that is "delay signed". Searching the web I found the solution in Microsoft.mshtml .dll problems... und the solution!!. I just downloaded the files mentioned in the link above and changed the references in the project to point to the downloaded DLL file (in Visual Studio 2005: right-click the project -> click "References" in the left tab -> remove the old reference to the DLL and add the new one).
I hope it helps someone...
Turns out what's installed on the PCs isn't the full .NET 3.5 framework. What's more, our system admins don't want us using ClickOnce. So I think the problem is almost certainly in the environment.
Cannot continue. The application is improperly formatted. Contact the application publisher for assistance.
Application validation did not succeed. Unable to continue.
Unable to retrieve application files. Files corrupt in deployment.
One of the manifest files in the deployment is syntactically not valid, or contains a hash that cannot be reconciled with the corresponding file. This error may also indicate that the manifest embedded inside an assembly is corrupted. Re-create your deployment and recompile your application, or find and fix the errors manually in your manifests.
From Troubleshooting ClickOnce Deployments
Maybe the manifest file got messed up?
Check your references to make sure you don't have a circular reference.
I solved this using the 'copy local' trick mentioned in Problems with mshtml.dll after installing VS2008.