Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce Manifest incorrectly includes <deploymentProvider> element
 

ClickOnce Manifest incorrectly includes <deploymentProvider> element

There must be an obvious cause for this problem but I'm not seeing it.

I have a VS2008 9.0.30729.1 built C# Windows app targeting .NET 2.0 that is intended to be deployed from a file share with online only deployment and have checked the option in the publish settings ("The application is available online only.") to enable this. The generation of the deployment succeeds with no errors. However, the resulting manifest contains the following:

<deployment install="false" mapFileExtensions="true">
<deploymentProvider codebase="http://devmachinename/SafetyStockAnalysis/SafetyStockAnalysis.application" />
</deployment>

For some reason it is incorrectly including the <deploymentProvider> element and setting it to a bogus location on the development machine even though install=false. Needless to say, this causes the installation to fail with the following error:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\servername\sharename\SafetyStockAnalysis\SafetyStockAnalysis.application resulted in exception. Following failure messages were detected:
+ Downloading http://devmachinename/SafetyStockAnalysis/SafetyStockAnalysis.application did not succeed.
+ The remote server returned an error: (404) Not Found.

I'm aware that I can edit the manifest and re-sign it to correct this error but would prefer not having to do this if possible.

Any ideas?

gregr_reeves  Thursday, March 19, 2009 11:59 PM
Did you specify an Update location for this particular application?

This can be specified through the Update Dialog on the property page. The Update dialog is only accessible for Offline applications.

There is an issue with VS2008 that if you specify an update location for an offline app and then switch it to an online only app the resulting deployment manifest willinclude a deployment provider as specified in the update location. To avoid this issue please delete the update location before switching back to an online only app.

Thanks
Saurabh

This posting is provided "AS IS" with no warranties, and confers no rights.
Saurabh Bhatia MSFT  Wednesday, March 25, 2009 12:55 AM
I don't think that "online only" is supported when you deploy to a network share, only to http. If you change it to online/offline, does it work?

Is there any specific reason you are using online-only?

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Friday, March 20, 2009 12:26 AM
We've been using this method sinceVS2005 daysand have about ten program thatare deployed via ClickOnce as onlline only applications that installfrom a network file share.

We use online only because we have a user role based program launcherthat sits in the system tray to provide access to the ClickOnce deployed programs. The user clicks on the program they want to start from the system tray menu and its installed and launched via a Process.Start() call. The program launcheritself isdepoyed as an MSI package via group policy.The system has been working very well for awhile now.

Its just the most recently developed programthat Ican't get to installbecause of the above mentioned deployment manifest issue. I can go back and re-publish any of the other programs (from the same dev machine) and they don't havethe <deploymentProvider> element in their manifests. Instead, they have the following line as would be expected:

<deployment install="false" mapFileExtensions="true" />

There is no <deploymentProvider> element to be found and the programs all install and run just fine.

If I set the publish properties tomake the SafetyStockAnalysis programavailable offline the generated deployment also fails. Here is the <deployment> section from the manifest:

<deployment install="true" mapFileExtensions="true">
<subscription>
<update>
<beforeApplicationStartup />
</update>
</subscription>
<deploymentProvider codebase="http://devmachinename/SafetyStockAnalysis/SafetyStockAnalysis.application" />
</deployment>

The manifest contains a <deployementProvider> element with a codebase attribute that is not correct.
gregr_reeves  Friday, March 20, 2009 10:42 PM
So it worked with VS2005, but doesn't with VS2008?

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Tuesday, March 24, 2009 3:51 AM
It works in VS2008 for all the existing projects. Just not the new project. All the projects are exactly the same in that they are .NET 2.0 based Windows Forms applications deployed to a file server as online only applications.

No errors occur during the new project's deployment generation but the new project does not install because of the incorrect inclusion of the <deploymentProvider> element in the ClickOnce manifest as described above.
gregr_reeves  Tuesday, March 24, 2009 11:51 PM
Did you specify an Update location for this particular application?

This can be specified through the Update Dialog on the property page. The Update dialog is only accessible for Offline applications.

There is an issue with VS2008 that if you specify an update location for an offline app and then switch it to an online only app the resulting deployment manifest willinclude a deployment provider as specified in the update location. To avoid this issue please delete the update location before switching back to an online only app.

Thanks
Saurabh

This posting is provided "AS IS" with no warranties, and confers no rights.
Saurabh Bhatia MSFT  Wednesday, March 25, 2009 12:55 AM
Thank you. This fixed the problem.
gregr_reeves  Sunday, March 29, 2009 11:54 PM
Hi Greg. I have been considering creating an application launcher very similar to what you describe for our company. I am encouraged that you have been able to successfully employ such a system. If you would be willing to jump start me on that project, could you send me an email at dnelson@carlsoncapital.com? I have a few questions that you might be able to help me answer.

Thanks,
David

Moderator | MCTS .NET 2.0 Web Applications | My Blog: http://www.commongenius.com
CommonGenius.com  Thursday, July 30, 2009 10:08 PM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce fails with no message when download to "owner" account
• Modifying Publishing URL
• Conditionally set registry value
• Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral...
• Upgrade Problems on Vista
• VS2005 Setup project without Add/Remove programs
• "Reference in the manifest does not match the identity of the downloaded assembly" error
• Visual Studio: ALLUSERS property
• ClickOnce Cache Location - how to change?
• Is there anyway to suppress the Repair or Delete dialogue during deployment?