Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce/MageUI Deployment Error - Using MageUI to add other assemblies to the install.
 

ClickOnce/MageUI Deployment Error - Using MageUI to add other assemblies to the install.

I have a Solution that has several 'plugin' files that need to be packaged along with the main Solution for deployment. The steps I take are:

-Publish via Visual Studio 2008 (so it creates the index.htm and setup.exe files)
-Drop the additional files into the publish folder on the web server
-Open the .manifest file with MageUI, add the new files, re-sign with the key provided by VS2008
-Open each of the .application files with MageUI, select the modified .manifest file, re-sign

When I click the install button I get all the way through to just after the install completes, then get a "Application cannot be started." dialog. The log is below.

This is in Windows XP SP2, the Solution is .Net 2.0 and is being compiled in Visual Studio 2008.

What am I doing wrong?

PLATFORM VERSION INFO
	Windows 			: 5.1.2600.196608 (Win32NT)
	Common Language Runtime 	: 2.0.50727.3082
	System.Deployment.dll 		: 2.0.50727.3053 (netfxsp.050727-3000)
	mscorwks.dll 			: 2.0.50727.3082 (QFE.050727-3000)
	dfdll.dll 			: 2.0.50727.3053 (netfxsp.050727-3000)
	dfshim.dll 			: 2.0.50727.3053 (netfxsp.050727-3000)

SOURCES
	Deployment url			: http://cteny.com/apps/dfclient/Deerfield.Client.application
						Server		: Microsoft-IIS/7.0
						X-Powered-By	: ASP.NET
	Deployment Provider url		: http://cteny.com/apps/dfclient/Deerfield.Client.application
	Application url			: http://cteny.com/apps/dfclient/Application%20Files/Deerfield.Client_1_0_0_7/Deerfield.Client.exe.manifest
						Server		: Microsoft-IIS/7.0
						X-Powered-By	: ASP.NET

IDENTITIES
	Deployment Identity		: Deerfield.Client.application, Version=1.0.0.7, Culture=en-US, PublicKeyToken=4bdb671eb25a08c3, processorArchitecture=msil
	Application Identity		: Deerfield.Client.exe, Version=1.0.0.7, Culture=en-US, PublicKeyToken=4bdb671eb25a08c3, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
	* Installable application.

ERROR SUMMARY
	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of http://cteny.com/apps/dfclient/Deerfield.Client.application resulted in exception. Following failure messages were detected:
		+ A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)

COMPONENT STORE TRANSACTION FAILURE SUMMARY
	* Transaction at [9/9/2009 9:09:50 AM]
		- Staging of a component (WeCare.Billing.dcm.genman) did not succeed.
		- Staging of a component file (WeCare.Billing.dcm) did not succeed.
		- Staging of a component (Ionic.Utils.Zip.dll.genman) did not succeed.
		- Staging of a component file (Ionic.Utils.Zip.dll) did not succeed.
		- Staging of a component (Deerfield.Base.dll.genman) did not succeed.
		- Staging of a component file (Deerfield.Base.dll) did not succeed.
		- Staging of a component (CrystalHelper.dll.genman) did not succeed.
		- Staging of a component file (CrystalHelper.dll) did not succeed.
		- Staging of a component (WebCrawler.dll.genman) did not succeed.
		- Staging of a component file (WebCrawler.dll) did not succeed.
		- Staging of a component (Deerfield.Client.exe.genman) did not succeed.
		- Staging of a component file (Deerfield.Client.exe) did not succeed.
		- Staging of a component (CTE.Plugins.dcm.genman) did not succeed.
		- Staging of a component file (CTE.Plugins.dcm) did not succeed.
		- Staging of a component (Deerfield.Plugins.Base.dll.genman) did not succeed.
		- Staging of a component file (Deerfield.Plugins.Base.dll) did not succeed.
		- Installation of deployment (http://cteny.com/apps/dfclient/Deerfield.Client.application#Deerfield.Client.application, Version=1.0.0.7, Culture=en-US, PublicKeyToken=4bdb671eb25a08c3, processorArchitecture=msil) did not succeed.
		- Setting one or more of the deployment metadata did not succeed.

WARNINGS
	There were no warnings during this operation.

OPERATION PROGRESS STATUS
	* [9/9/2009 9:09:43 AM] : Activation of http://cteny.com/apps/dfclient/Deerfield.Client.application has started.
	* [9/9/2009 9:09:43 AM] : Processing of deployment manifest has successfully completed.
	* [9/9/2009 9:09:43 AM] : Installation of the application has started.
	* [9/9/2009 9:09:43 AM] : Processing of application manifest has successfully completed.
	* [9/9/2009 9:09:46 AM] : Request of trust and detection of platform is complete.
	* [9/9/2009 9:09:49 AM] : Downloading of subscription dependencies is complete.
	* [9/9/2009 9:09:49 AM] : Commit of the downloaded application has started.

ERROR DETAILS
	Following errors were detected during this operation.
	* [9/9/2009 9:09:50 AM] System.Runtime.InteropServices.COMException
		- A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
		- Source: System.Deployment
		- Stack trace:
			at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults)
			at System.Deployment.Internal.Isolation.Store.Transact(StoreTransactionOperation[] operations, UInt32[] rgDispositions, Int32[] rgResults)
			at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState)
			at System.Deployment.Application.ComponentStore.SubmitStoreTransactionCheckQuota(StoreTransactionContext storeTxn, SubscriptionState subState)
			at System.Deployment.Application.ComponentStore.CommitApplication(SubscriptionState subState, CommitApplicationParams commitParams)
			at System.Deployment.Application.SubscriptionStore.CommitApplication(SubscriptionState& subState, CommitApplicationParams commitParams)
			at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
	* Transaction at [9/9/2009 9:09:50 AM]
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Installed
			- HRESULT: 0x0
			- Manifest: B0T18YCN.VEK.application
		+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
			- Status: Set
			- HRESULT: 0x0
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Installed
			- HRESULT: 0x0
			- Manifest: Deerfield.Client.exe.manifest
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Modules\CTE.Plugins.exe.config
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Modules\CTE.Plugins.pdb
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Modules\WeCare.Billing.pdb
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Resources\Arrow_Right.png
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Resources\Arrow_Left.png
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Deerfield.Base.pdb
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Modules\Deerfield.Plugins.Base.pdb
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Deerfield.Client.pdb
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Resources\Icon_Normal.ico
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Modules\WeCare.Billing.exe.config
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Installed
			- HRESULT: 0x0
			- File: Deerfield.Client.exe.config
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x8007001f
			- Manifest: WeCare.Billing.dcm.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: WeCare.Billing.dcm
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: Ionic.Utils.Zip.dll.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: Ionic.Utils.Zip.dll
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: Deerfield.Base.dll.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: Deerfield.Base.dll
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: CrystalHelper.dll.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: CrystalHelper.dll
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: WebCrawler.dll.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: WebCrawler.dll
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: Deerfield.Client.exe.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: Deerfield.Client.exe
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: CTE.Plugins.dcm.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: CTE.Plugins.dcm
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
			- Status: Failed
			- HRESULT: 0x1
			- Manifest: Deerfield.Plugins.Base.dll.genman
		+ System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
			- Status: Failed
			- HRESULT: 0x1
			- File: Deerfield.Plugins.Base.dll
		+ System.Deployment.Internal.Isolation.StoreOperationInstallDeployment
			- Status: Failed
			- HRESULT: 0x1
			- AppId: http://cteny.com/apps/dfclient/Deerfield.Client.application#Deerfield.Client.application, Version=1.0.0.7, Culture=en-US, PublicKeyToken=4bdb671eb25a08c3, processorArchitecture=msil
		+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
			- Status: Failed
			- HRESULT: 0x1
		+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
			- HRESULT: 0x1

Jake.Slack  Wednesday, September 09, 2009 8:17 PM
Changed the files in question to .exe files (since that is what they really are) and everything worked. However we would like to use our custom extensions, it makes several things much easier in the plug-in system. Any ideas on how to tell ClickOnce to treat .dcm files as .exe files?
  • Marked As Answer byJake.Slack Wednesday, September 16, 2009 1:13 PM
  •  
Jake.Slack  Tuesday, September 15, 2009 12:57 PM
Why don't you just add the plug-in files to the main application's project, set the build action to Content, and the "copy to output directory" as "copy always"? Then they will be included automatically and you won't have to add them to the manifest and re-sign.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Sunday, September 13, 2009 12:18 AM
The main reason we don't do that is because those plug-ins are not part of our core product. There are several dozen of them, each with its own project. The core solution would be very cluttered if I was to put them all in that solution. The other reason is that we want to allow other developers to develop plug-ins for our software. By forcing plug-ins to be included in the core solution we would have to also hand out our source code.

In essence what I would like to do is add folder 'X' to a ClickOnce deployment as content using mage (or some other tool).
Jake.Slack  Monday, September 14, 2009 3:20 PM
I am pretty much following the steps in this article: http://www.code-magazine.com/Article.aspx?quickid=0611041

However, several of the plug-in's have files with custom extensions. Those seem to be the files that are failing. I haven't been able to figure out how to get ClickOnce/Mage work with file associations just yet.
Jake.Slack  Monday, September 14, 2009 8:44 PM
Changed the files in question to .exe files (since that is what they really are) and everything worked. However we would like to use our custom extensions, it makes several things much easier in the plug-in system. Any ideas on how to tell ClickOnce to treat .dcm files as .exe files?
  • Marked As Answer byJake.Slack Wednesday, September 16, 2009 1:13 PM
  •  
Jake.Slack  Tuesday, September 15, 2009 12:57 PM
Have you considered deploying the plug-ins differently? If they are not part of your core product, then I assume the product will run without them. You know, what you could do, is use ClickOnce to deploy each plug-in or set of plug-ins, then pick up the files from the main product.

Here's an idea of how to do that:

For each plug-in or set of plug-ins, create a solution that has a WinForms project and your plug-ins project. Create a ClickOnce deployment out of it so that it includes the plug-ins assemblies in the deployment of the winform project.

On startup, have it copy the plug-in dll's to a central folder where the main product can look for them, and then just exit. The recommended location is LocalApplicationData.

string userFilePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string myFolder = Path.Combine(userFilePath, "MyCompany");
if (!Directory.Exists(myFolder))
Directory.CreateDirectory(myFolder);
File.Copy(Path.Combine(System.Windows.Forms.Application.StartupPath, "mydllname.dll"), myFolder);

I'd set the form's visible property to false.

Now, the main product can install a plug-in or update it by just doing a process.start on the URL pointing to the application file for the plug-in.

process.start("iexplore.exe", http://mystuff.mycompany.com/myprojctdll/mydll.application)

I'm not sure this will help you, but thought I'd post it just in case. The advantage of it is that you can trigger an update of the plug-in from the main application, and it gives you more flexibility as to which user has which plug-in, if you need that.

RobinDotNet

Click here to visit my ClickOnce blog!
RobinDotNet  Sunday, September 20, 2009 6:48 PM

You can use google to search for other answers

Custom Search

More Threads

• CheckForUpdateAsync not raise event
• Send URL querystring from Windows Form
• Updater Application Block alternative? ClickOnce multiple users?
• Creating directories during an MSI install
• How to Copy files to remote machine using MSI?
• ClickOnce FAQ Now Available
• Publish Program With Database And Crystal
• ClickOnce Fails on Computers W/Out VS 2008
• Multiple install of the same web project
• Unable to use VS 2008 ClickOnce Publish to FTP.