Troubleshoot ClickOnce Deployment problems

A tool that many people are not aware of is MaGe – the Manifest Generator tool (mage.exe). It resides under your root Visual Studio 2005 directory SDK folder in the bin subfolder along with the rest of the .NET SDK tools.

ClickOnce deployment (.application) and application (.exe.manifest) manifest files are just XML files with a particular schema that are digitally signed with either a strong name key file (.snk by convention) or a publlisher certificate. That signing process ensures the identity of the publisher as well as making sure that the manifests are not tampered with (say to add a malicious file as part of the application download) after being published.

MaGe allows you to open, edit, and save both types of manifest files. When you save the file, it prompts you for a key file or certificate to re-sign the manifest. The tool is intended for large organizations where the deployment servers will likely be managed by IT folks that are not the developers and not running VS2005, so that they can make updates to the deployed applications and the information that goes into the manifest.

However, MaGe can also be a big help in troubleshooting and understanding your ClickOnce deployments in the development environment, especially while we are still in Beta and sometimes problems occur. One of my collegues was having a problem where he could not launch any ofhis ClickOnce applications after publishing. We are still trying to track down root cause, but simply opening the manifests in Mage and resaving them fixed the problem.

You saw in a previous posthow you can also use MaGe to handle resigning the deployment manifest after making a manual addition to support command line arguments.

Just another good trick to have in your toolbox if you are working with ClickOnce. Hopefully this will really just be a handy tool for admins once we get to release, but for now it is pretty important for devs as well.