2

我有一个 .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)

任何想法为什么这两个应用程序会发生冲突?

4

1 回答 1

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

于 2013-01-09T21:56:33.500 回答