2014-09-24 100 views
1

我以ClickOnce部署方式運行Windows窗體應用程序。當我調試解決方案 我沒有得到任何錯誤。它工作正常。 但是,當我發佈應用程序使用單擊一次部署並從 文件夾運行應用程序,我收到以下錯誤日誌。 任何人都可以幫我解決問題是什麼?強名稱簽名無效於此程序集Microsoft.Practices.EnterpriseLibrary.Data.dll

 The Dll's are in assemblies folder in one of the project.And they are used in other project as reference. 

PLATFORM VERSION INFO 
    Windows    : 6.1.7601.65536 (Win32NT) 
    Common Language Runtime  : 4.0.30319.18063 
    System.Deployment.dll  : 4.0.30319.17929 built by: FX45RTMREL 
    clr.dll    : 4.0.30319.18063 built by: FX45RTMGDR 
    dfdll.dll   : 4.0.30319.17929 built by: FX45RTMREL 
    dfshim.dll   : 4.0.41209.0 (Main.041209-0000) 

SOURCES 
    Deployment url   : WorkPC/FaxPromptTool/xrm.OutboundFax.application 
         Server  : Microsoft-IIS/7.5 
         X-Powered-By : ASP.NET 
    Application url   : WorkPC/FaxPromptTool/Application%20Files/xrm.OutboundFax_1_0_0_5/xrm.OutboundFax.exe.manifest 
         Server  : Microsoft-IIS/7.5 
         X-Powered-By : ASP.NET 

IDENTITIES 
    Deployment Identity  : xrm.OutboundFax.application, Version=1.0.0.5, Culture=neutral, PublicKeyToken=f841479c30c8d3cb, processorArchitecture=x86 
    Application Identity  : xrm.OutboundFax.exe, Version=1.0.0.5, Culture=neutral, PublicKeyToken=f841479c30c8d3cb, processorArchitecture=x86, type=win32 

APPLICATION SUMMARY 
    * Online only application. 
    * Trust url parameter is set. 
ERROR SUMMARY 
    Below is a summary of the errors, details of these errors are listed later in the log. 
    * Activation of http://pc265075/FaxPromptTool/xrm.OutboundFax.application resulted in exception. Following failure messages were detected: 
     + Strong name signature not valid for this assembly Microsoft.Practices.EnterpriseLibrary.Data.dll. 

COMPONENT STORE TRANSACTION FAILURE SUMMARY 
    No transaction error was detected. 

WARNINGS 
    There were no warnings during this operation. 

OPERATION PROGRESS STATUS 
    * [09/23/14 8:53:12 PM] : Activation of http://pc265075/FaxPromptTool/xrm.OutboundFax.application has started. 
    * [09/23/14 8:53:12 PM] : Processing of deployment manifest has successfully completed. 
    * [09/23/14 8:53:12 PM] : Installation of the application has started. 
    * [09/23/14 8:53:12 PM] : Processing of application manifest has successfully completed. 
    * [09/23/14 8:53:16 PM] : Found compatible runtime version 4.0.30319. 
    * [09/23/14 8:53:16 PM] : Request of trust and detection of platform is complete. 

ERROR DETAILS 
    Following errors were detected during this operation. 
    * [09/23/14 8:53:17 PM] System.Deployment.Application.InvalidDeploymentException (SignatureValidation) 
     - Strong name signature not valid for this assembly Microsoft.Practices.EnterpriseLibrary.Data.dll. 
     - Source: System.Deployment 
     - Stack trace: 
      at System.Deployment.Application.ComponentVerifier.VerifyStrongNameAssembly(String filePath, AssemblyManifest assemblyManifest) 
      at System.Deployment.Application.ComponentVerifier.StrongNameAssemblyComponent.Verify() 
      at System.Deployment.Application.ComponentVerifier.VerifyComponents() 
      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) 

COMPONENT STORE TRANSACTION DETAILS 
    No transaction information is available. 
+0

在面值上看起來好像是Microsoft.Practices.EnterpriseLibrary.Data.dll損壞了強名稱,某種篡改使哈希無效,或者是您使用的這個二進制文件是不兼容的與環境/框架,並沒有簽名驗證(錯誤是對實際問題的包裝)。企業庫的來源是什麼,使用哪個版本。 – 2014-09-24 04:56:24

回答

1

當我點擊一次部署時,我遇到了同樣的問題。可能的錯誤是屬性設置錯誤。 1.你是否強烈地指名這個大會? 強命名後,你刪除舊的參考並添加一個新的?如果這樣做是錯誤的。我們不需要再次明確地添加dll。一旦我們構建它會自動引用。 如果您刪除了明確添加的引用,請檢查以下條件, 1.a轉到項目屬性 - >發佈 - >應用程序文件 - >檢查是否有任何對此特定DLL的引用,而不是GAC引用(默認情況下爲DLL將從GAC中被轉換爲DLL,當你明確地從你的機器添加引用,那麼本地引用也將被添加) - >如果你找到任何這樣的東西,只需排除它再次構建它,並觸發一次新的點擊 - >問題應該解決。

  1. 並將參考集的CopyLocal屬性設置爲true。參考 - >選擇相應的DLL - >將copyLocal屬性設置爲true。

謝謝, Gayathri。 [email protected]

+0

請在提問時改進內容。目前還不清楚!請參考:http://stackoverflow.com/help/how-to-ask – Vikrant 2015-03-20 11:31:02

相關問題