.net - 启动编译为目标 'Any CPU' 的 .NET 应用程序时出错

标签 .net vb.net x86 64-bit

我有一个共享给大约 30 台不同计算机(32 位和 64 位机器的混合)的 .NET 应用程序。

编译时,应用程序设置为目标“任何 CPU”。

除了 Windows 7 64 位之外,它在所有机器上都运行良好。

错误信息是:

Following errors were detected during this operation. * [11/2/2011 8:59:40 AM] System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment



经过研究,我发现如果我将 objective-c PU更改为64位,它在问题机器上运行良好,但在32位计算机上无法运行。

有没有办法解决这个问题?

堆栈跟踪:
- Stack trace:
    at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
    at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
    at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
    at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
    at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
    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)

最佳答案

在 MSDN 论坛上发现的一个高度相关的主题是 ClickOnce Fails with "Value does not fall within the expected range."

关于.net - 启动编译为目标 'Any CPU' 的 .NET 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7980773/

相关文章:

c# - 帮助正则表达式。需要提取 `<A HREF`

c# - MySQL 连接器在枚举后面附加比实际值小一的值

c - SSE2:将二维数组中的有符号整数与 double 相乘并在 C 中对结果求和

c# - 检索具有特殊字符的嵌入资源

.net - 使用类型和格式字符串将字符串转换为对象

c# - 来电显示检测 : Doesnt work with some phones

c# - ASP.NET ObjectDataSource 找不到具有参数的非泛型方法

vb.net - 重新启动 PC,停止使用 VB.NET 进行编码

performance - 是由精确地址流还是由高速缓存行流触发预取?

performance - 在 x86 程序集 : xor, mov 或 and 中将寄存器设置为零的最佳方法是什么?