2012-12-17 75 views
2

我有一個.NET 4 WPF ClickOnce部署,安裝並正常工作。但是,我們也有不同的.NET 3.5 WPF應用程序,該應用程序使用從同一服務器安裝的不同密鑰進行簽名,如果第一個應用程序已安裝,則會使用不同的URL位置進行安裝。如果首先安裝.NET 3.5應用程序,並且我嘗試安裝.NET 4應用程序,則它將失敗。這已被複制到多臺機器上,StackTrace如下所示。兩個不同的ClickOnce應用程序不能安裝在同一臺計算機上

Application cannot start... 

+ Exception occurred during store operation. 
+ Value does not fall within the expected range. 

ERROR DETAILS 
Following errors were detected during this operation. 
* [12/17/2012 8:06:51 AM] System.Deployment.Application.DeploymentException (ComponentStore) 
- Exception occurred during store operation. 
- Source: System.Deployment 
- Stack trace: 
at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(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) 
--- Inner Exception --- 
System.ArgumentException 
- Value does not fall within the expected range. 
- Source: System.Deployment 
- Stack trace: 
at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults) 

任何想法爲什麼這兩個應用程序會有衝突?

回答

2

所以問題出在兩個我正在使用的程序集......當應用程序單獨安裝但是與3.5應用程序(使用相同程序集的舊版本)有某些衝突時工作正常。

導致問題的組件是:

Microsoft.Practices.EnterpriseLibrary.Common-4.1.0.0.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling-4.1.0.0.dll

我除去這些並用新的5.0。*版本替換,並且可以在同一臺機器上發佈和安裝這兩個應用程序。

這些都是新的DLL名稱:

Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll

相關問題