2011-08-16 50 views
2

我該如何補救?我是否需要使用此處描述的清單設置從源代碼構建NSB:http://geekswithblogs.net/rakker/archive/2007/12/06/117449.aspxClickOnce和NServiceBus? 「清單中的引用與下載的程序集NServiceBus.Host.exe的標識不匹配。」

ERROR 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) 
+0

你想做什麼? –

+0

我NServiceBus.Host.exe在我的WinForms exe文件引用...它抱怨 –

回答

2

NServiceBus.Host.exe是全部由自己運行的終點,並提供方便的安裝一個端點作爲Windows服務的手段。

如果您嘗試將NServiceBus嵌入到Windows窗體應用程序中,那麼WinForms exe文件需要成爲「主機」。不要引用NServiceBus.Host.exe。只引用NServiceBus.dll和NServiceBus.Core.dll。 (和log4net.dll可能也是如此。)

在WinForms應用程序的啓動中,您將需要manually initialize the Bus, as described here

這至少是在Windows窗體應用程序中使用NServiceBus的一般模式。我還沒有專門嘗試用ClickOnce發佈這樣的應用程序。我不確定ClickOnce是否可以處理MSMQ依賴關係。

+0

我不是專門引用NServiceBus,但它仍然在抱怨,我很可能被忽視的東西,但因爲我我還沒有看過,更公正重新編譯它(NSB)沒有清單,現在一切正在工作。 –

+0

問題是我自動和手動配置端點...我需要刪除實現了「IConfigureThisEndpoint,AsA_Client」接口的類。我是NSB noobie! –

相關問題