Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Publisher info in ClickOnce manifest
 

Publisher info in ClickOnce manifest

Hi

Was working on automating the deployment of our ClickOnce application at customer servers (lots of mage.exe calls) to be as handsfree as possible and ran into a strange error when testing:

"Deployment manifest requires that you specify a publisher and a product"

Sure enough, the manifest included an empty string for the publisher. Okay, so I started looking for a -Publisher commandline option but none was to be found. Huh? Fired up Reflector and quickly found that the Publisher info is taken from the registry (LocalMachine\Software\Microsoft\Windows NT\CurrentVersion@RegisteredOrganization).

Is this not a bit too un-flexible, are there not scenarios where you would like to insert a specifically named publisher (hence the missing commandline option)? Is this a design decision with a reasoning I just can't figure out or did the dev team just not have the time to parse another commandline argument Smile?

Anyway, are my only options to edit the manifest-xml directly and resign or any other ideas?

As an aside I found a reported error at Connect, issue ID 121176 that seems to relate to this issue

Enemaerke  Monday, December 10, 2007 12:35 PM

> Anyway, are my only options to edit the manifest-xml directly and resign or any other ideas?

Thats what i am doing here. We have to deploy our ClickOnce applications to different locations in the startmenu for every environment: Development, Test, Production. As you know, this is not possible for one single project with the visual studio publish mechanism. So for every environment I create an install folder and an application manifest with the following data:

Code Block

<asmv1:assembly ...>
<assemblyIdentity name="Test-My.application" version="1.0.3.0" .../>
<description asmv2:publisher="Me" asmv2:product="My Product (MyTest)" .../>
<deployment install="true">
<subscription>
<update>
<beforeApplicationStartup />
</update>
</subscription>
<deploymentProvider ...

There you have the applicationIdentity which is unique for every environment and so every environment deployment gets its own start menu entry and local folder in the ClickOnce cache. The publisher and product names are also provided here.

Publishing is done with the help of some NAnt-Tasks which in turn start mage.exe. You have to be careful here to only update the application deployment manifest with mage.exe and not recreate it with every deployment.That wayyour data in name, publisher and product is preserved.

hope this helps,

matthias

Matthias Schmidt

Technical Consultant

sd&m, Frankfurt Germany

Matthias Schmidt  Wednesday, December 12, 2007 12:00 PM

> Anyway, are my only options to edit the manifest-xml directly and resign or any other ideas?

Thats what i am doing here. We have to deploy our ClickOnce applications to different locations in the startmenu for every environment: Development, Test, Production. As you know, this is not possible for one single project with the visual studio publish mechanism. So for every environment I create an install folder and an application manifest with the following data:

Code Block

<asmv1:assembly ...>
<assemblyIdentity name="Test-My.application" version="1.0.3.0" .../>
<description asmv2:publisher="Me" asmv2:product="My Product (MyTest)" .../>
<deployment install="true">
<subscription>
<update>
<beforeApplicationStartup />
</update>
</subscription>
<deploymentProvider ...

There you have the applicationIdentity which is unique for every environment and so every environment deployment gets its own start menu entry and local folder in the ClickOnce cache. The publisher and product names are also provided here.

Publishing is done with the help of some NAnt-Tasks which in turn start mage.exe. You have to be careful here to only update the application deployment manifest with mage.exe and not recreate it with every deployment.That wayyour data in name, publisher and product is preserved.

hope this helps,

matthias

Matthias Schmidt

Technical Consultant

sd&m, Frankfurt Germany

Matthias Schmidt  Wednesday, December 12, 2007 12:00 PM

Hi Matthias

Thanks for your input. I've resolved to handcode some editing of the manifest files as well before the signing of the manifests, so I've got it working as I want to now. My main gripe however was that the publisher information was extracted from the registry and could notbe overriden by somethingprovided on the commandline to mage. As part of my digging deeper into the manifest format it seems that a number of "settings" in the manifest file which are editable from the mageui cannot be specified from the mage commandline (trustURLParameters, mapFileExtensions). It seems an odd choice to me to not expose all these to commandline arguments since it effectively will cause developers to write custom logic themselves to insert the settings into the manifest (just as I have had to do)...

Anyway, thanks for providing your info.

Søren

Enemaerke  Wednesday, December 12, 2007 12:10 PM

Hi Søren,

Enemaerke wrote:

As part of my digging deeper into the manifest format it seems that a number of "settings" in the manifest file which are editable from the mageui cannot be specified from the mage commandline (trustURLParameters, mapFileExtensions).

You're right. This is a real pain, especially in an automated build and deploy environment.

ciao, matthias

Matthias Schmidt  Wednesday, December 12, 2007 12:32 PM

You can use google to search for other answers

Custom Search

More Threads

• Publishing Location, Installation URL, Update Location
• Recommendations Wise/InstallShield/VisualStudio
• Internet Explorer 7 problem
• Dynamic creation of an SQL Server database
• Web Setup Project Created on Vista x64 works on it, but fails on Xp/2003 in VM
• Visual Studio setup project treats each file as separate component
• Set application path (from registry) as installation path
• .application file dont run
• Creating a MSI for a XBAP and changing the confiig file while installing
• Installation Problem.