ClickOnce and NServiceBus? "Reference in the manifest does not match the identity of the downloaded assembly NServiceBus.Host.exe."
How do I remedy this? Do I need to build NSB from source with the Manifest settings described here: http://geekswithblogs.net/rakker/archive/2007/12/06/117449.aspx?
ERRO开发者_Go百科R DETAILS
Following errors were detected during this operation.
* [8/16/2011 2:26:17 PM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Reference in the manifest does not match the identity of the downloaded assembly NServiceBus.Host.exe.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
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)
NServiceBus.Host.exe is for running an endpoint all by itself, and provides the means to easily install an endpoint as a Windows service.
If you are trying to embed NServiceBus within a Windows Forms app, then the WinForms exe needs to be the "host". Do not reference NServiceBus.Host.exe. Only reference NServiceBus.dll and NServiceBus.Core.dll. (And log4net.dll probably as well.)
Within the startup of your WinForms app, you will need to manually initialize the Bus, as described here.
This, at least, is the general pattern for using NServiceBus within a Windows Forms app. I have not specifically tried releasing an app like that with ClickOnce. I'm not sure if ClickOnce can take care of the MSMQ dependency or not.
精彩评论