views:

1586

answers:

5

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?

A: 

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.

Robert Kozak
Thanks for the link. I hadn't seen that one. It's happening on more than one project, so it's not related specifically to one assembly. One of the projects has only one reference, to one of the PIAs for Office. So I don't think there's an issue with circular references. It's either something about my environment or something I'm doing wrong.
John M Gant
Could you be referencing one version of an assembly in your solution, but deploying another? Or referencing two different versions? Both of those cause this problem. I can start with this question: Are you referencing stdole.dll?
RobinDotNet
+1  A: 

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.

John M Gant
Just curious--but why are your system admins against ClickOnce?
Jeff
The complete answer is a little complicated (and may be proprietary), but I think basically they just don't like the whole premise.
John M Gant
+2  A: 

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 here: http://peitor.blogspot.com/2007/12/microsoftmshtml-dll-problems-und.html. Just downloaded the files mentioned in the link above and changed the references in the project to point to the downloaded DLL (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).

Hope it helps someone... Sorry for the bad english!

BrunoSalvino
A: 

I solved this using the 'copy local' trick mentioned here: http://www.pcreview.co.uk/forums/thread-3419651.php

Dinis Cruz
A: 

this fills me with confidence in the clickonce process.

bill