We're trying to publish a ClickOnce application, but we are forced to do so using MSBuild, since we're suffering from the Visual Studio bug where Visual Studio stupidly insists on re-enabling 'The application should check for updates', which we do not want.
Using MSBuild does not suffer from this, but it does not produce the same output as using Visual Studio's 'Publish...' (despite what MSDN says). We're obfuscating the code in a Post-Build Event, and MSBuild seems to sign the application manifests at the wrong point in the process.
For the record, we're using the following MSBuild command line:
msbuild /t:Publish
Using MSBuild and enabling obfuscation yields output, but when I try to install the application from the generated manifests, I get the following ClickOnce error:
* Activation of http://download.foo.com/Test/Foo.application resulted in exception. Following failure messages were detected:
+ File, Foo.exe, has a different computed hash than specified in manifest.
Disabling the obfuscation does not yield this error, but obviously we're not going to publish unobfuscated code.
I've tried using MageUI to re-sign the manifests, but this does not seem to fix it.
My question is: what does Visual Studio do differently? Does it use a different MSBuild target? If so, which one? How can I fix my certificate problems?