我有一个安装并正常运行的.NET 4 WPF ClickOnce部署。但是,我们还有一个不同的.NET 3.5 WPF应用程序,该应用程序使用从同一服务器安装的不同密钥进行签名,并且如果已安装第一个应用程序,则安装失败的URL位置不同。如果首先安装.NET 3.5应用程序并尝试安装.NET 4应用程序,它也会失败。这已在多台机器上复制,StackTrace如下所示。
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)
为什么这两个应用程序会出现冲突?
答案 0 :(得分: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