我有一个使用MS Access作为数据库的.NET应用程序。我一直在使用AnyCPU作为编译目标。这在Windows XP 32bit上运行良好。现在我需要部署到Windows 7 64位。首次部署时,数据库连接失败。所以我发现我需要将编译目标更改为x86以强制Windows 7 64位以32位模式运行程序。这很好用。但是当我尝试在Windows XP 32bit上运行该程序时,它失败了。
我很困惑,有人能指出我如何解决这个问题吗?
编辑:
以下是Windows XP计算机上ClickOnce的错误详细信息,编译目标是x86:
错误细节
Following errors were detected during this operation. * [2/10/2011 10:29:44 PM] System.Deployment.Application.DeploymentException (SubscriptionState) - The deployment identity does not match the subscription. - Source: System.Deployment - Stack trace: at System.Deployment.Application.SubscriptionStore.CheckUpdateInManifest(SubscriptionState subState, Uri updateCodebaseUri, AssemblyManifest deployment, Version currentVersion, Boolean& bUpdateInPKTGroup) at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile) 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 :(得分:1)
我找到了解决方案。问题是,在我从“AnyCPU”更改为“x86”后,由于身份错误,更新失败。我不得不卸载旧版本。之后程序安装并成功运行。
@Chris Schmich - 感谢您指出错误的详细信息。