"无法找到一个版本在运行的运行此申请表]对于在64位的Windows 32位应用程序 [英] "Unable to find a version of runtime to run this application" for 32bit app on 64bit Windows

查看:108
本文介绍了"无法找到一个版本在运行的运行此申请表]对于在64位的Windows 32位应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个32位的WinForm程序(目标:.NET 3.5)。我的客户坚持应用程序被安装到Windows \ System32下\ CLIENTNAME文件夹,并在启动时自动启动。此外,该应用程序的必须是32位,所以我不能使用任何CPU。

I am developing a 32bit WinForm app (target: .NET 3.5). My client insists the app be installed into "Windows\System32\clientname" folder and autostarts on startup. Also, the app must be 32bit, so I can't use "Any CPU".

我在X64 Win7的发展与VS2010并安装了所有版本的.NET。当我启动应用程序,我得到的消息无法找到一个版本在运行的运行此应用程序。 在Win7的x86的它的工作原理没有问题。这不是应用程序本身,我100%确保安装所有需要的框架。

I am developing under Win7 x64 with VS2010 and all versions of .NET are installed. When I start the app I get the message "Unable to find a version of runtime to run this application". On Win7 x86 it works without problem. It's not the app itself and I am 100% sure all the required frameworks are installed.

我知道,在x64系统上此文件夹不用于32位应用程序,但正如我所说的:客户端和坚持不会让步

I know that on a x64 system this folder is not to be used for 32bit apps but as I said: client insists and won't budge.

在我告诉客户明确,它不能做我想要探索的所有选项。我一派,当然,也搜查这家网站,但没有什么有助于我的特殊情况出现了。

Before I tell client definitively that it can't be done I want to explore all options. I googled of course and also searched this fine site but nothing helpful for my particular situation came up.

我的应用程序产卵在同一文件夹中其他32位进程。在x64是没有任何工作,当然,但我解决了,通过使用Wow64DisableWow64FsRedirection,然后将其复制到其他位置,从那里开始它(工作正常)。 我已经做了功课,但我就是找不到在x64并且在特定的文件夹启动主应用程序的解决方案。

My app spawns another 32bit process located in the same folder. On x64 that didn't work either, of course, but I solved that by using "Wow64DisableWow64FsRedirection" and then copying it to another location to start it from there (which works fine). I have done my homework but I just can't find a solution for starting the main app under x64 and in that particular folder.

有一?

推荐答案

在试图解决这个问题,我创建了两个文件夹在我的X64 Win7的机器:

In an attempt to solve this problem I created two folders on my Win7 x64 machine:

  • C:\ WINDOWS \ SYSTEM32 \ CLIENTNAME ;和
  • C:\ WINDOWS \ Syswow64资料\ CLIENTNAME
  • C:\Windows\System32\ClientName; and
  • C:\Windows\SysWOW64\ClientName

接下来,我创建了针对.NET 3.5一个简单的x86 WinForms应用程序。我发现,如果我复制的可执行文件 C:\ WINDOWS \ SYSTEM32 \ CLIENTNAME 我得到了完全相同的错误消息,因为你的报道。

Next I created a simple x86 WinForms application targeting .NET 3.5. I found that if I copied the executable to C:\Windows\System32\ClientName I got exactly the same error message as you reported.

但是,如果我复制可执行文件以两个目录,然后我可以从启动C:\ WINDOWS \ SYSTEM32 \ CLIENTNAME ,和它的工作就好了

However, if I copied the executable to both directories, then I could start it from C:\Windows\System32\ClientName, and it worked just fine.

我没有尝试这一点,但我怀疑,如果你有一个多组件的应用程序,你只需要复制 *。exe文件文件到 C:\ WINDOWS \ SYSTEM32 \ CLIENTNAME 。那么所有其他文件(EXE文件)会驻留在 C:\ WINDOWS \ Syswow64资料\ CLIENTNAME 目录

I did not try this, but I suspect that if you have a multi-assembly application, you only need to copy the *.exe file to C:\Windows\System32\ClientName. All of the other files (and the EXE) would then reside in the C:\Windows\SysWOW64\ClientName directory.

这是一个有点凌乱的解决方案,我知道,但话又说回来你的客户的要求是有点不寻常的开始。

This is a bit of an untidy solution, I know, but then again your client's requirement is a bit unusual to start with.

这篇关于"无法找到一个版本在运行的运行此申请表]对于在64位的Windows 32位应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆