简体   繁体   English

当程序集位于“C:\Windows\System32”内时,我得到“无法找到运行此应用程序的运行时版本”

[英]When assembly is inside 'C:\Windows\System32' i get 'Unable to find a version of the runtime to run this application'

I'm currently writing a screensaver using C# and the express version of VS2010.我目前正在使用 C# 和 VS2010 的 express 版本编写屏幕保护程序。 I've created a nice little screensaver and renamed the resulting assembly to have a *.scr extension.我创建了一个漂亮的小屏幕保护程序,并将生成的程序集重命名为具有 *.scr 扩展名。

When i place this on my desktop and double click it (or select configure from the context menu), it runs fine and displays the correct form/screensaver.当我将它放在我的桌面上并双击它(或从上下文菜单中配置 select)时,它运行良好并显示正确的表单/屏幕保护程序。 However, when i install this by placing it into the C:\Windows\System32 folder, i try double clicking on it and get this error:但是,当我通过其放入C:\Windows\System32文件夹来安装它时,我尝试双击它并收到此错误:

Unable to find a version of the runtime to run this application

Also it doesn't work from the screensaver control panel.它也不能从屏幕保护程序控制面板工作。 It's listed in the drop-down but it doesn't function.它列在下拉列表中,但没有 function。

Any idea what is going on?知道发生了什么吗?

The problem is that the screensaver was compiled for 32bit cpu.问题是屏幕保护程序是为 32 位 cpu 编译的。 Only 64bit exes are allowed in the %WINDIR%\System32 folder on a 64bit OS.在 64 位操作系统上的%WINDIR%\System32文件夹中只允许 64 位 exe。 Which in fact, i was using Windows7 64bit.事实上,我使用的是 Windows7 64 位。

The correct place to put 32bit screensavers is in %WINDIR%\SysWOW64 or compile using 'AnyCPU' option in Visual Studio then you can install into the %WINDIR%\System32 for all.放置 32 位屏幕保护程序的正确位置是%WINDIR%\SysWOW64或使用 Visual Studio 中的“AnyCPU”选项编译,然后您可以安装到%WINDIR%\System32中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “无法找到运行此应用程序的运行时版本”,适用于64位Windows上的32位应用程序 - “Unable to find a version of runtime to run this application” for 32bit app on 64bit Windows 为什么我收到这个错误: System.UnauthorizedAccessException: 'C:\\Windows\\system32\\CSV_file' - why to I get this error: System.UnauthorizedAccessException: 'C:\Windows\system32\CSV_file' 收到 DirectoryNotFoundException: c:\\windows\\system32\\inetsrv\\Static_Files 当应用程序移动到实时服务器时 - Received a DirectoryNotFoundException: c:\windows\system32\inetsrv\Static_Files When application was moved to a live server Windows窗体程序找不到mdb文件(C:\ windows \ system32 \ qbcdb.mdb) - Windows Form program can not find mdb file (C:\windows\system32\qbcdb.mdb) C#错误Windows启动时,对路径'C:\\ Windows \\ system32 \\ Com \\ dmp'的访问被拒绝 - C# Error Access to the path 'C:\Windows\system32\Com\dmp' is denied When Windows Startup 找不到运行该应用程序的运行时版本 - Unable to find a version of the runtime to run this application 找不到文件 'c:\\windows\\system32\\inetsrv\\xxx.xlsx' - Could not find file 'c:\windows\system32\inetsrv\xxx.xlsx' 找不到路径的一部分 'C:\\Windows\\System32\\oobe\\info\\Backgrounds - Could not find a part of the path 'C:\\Windows\\System32\\oobe\\info\\Backgrounds 如何在 C# 中获取 Windows\system32\config\systemprofile\AppData\Local\ 文件夹路径? - How to get Windows\system32\config\systemprofile\AppData\Local\ folder path in C#? 拒绝访问路径“ C:\\ Windows \\ System32 \\” - Access to the path 'C:\Windows\System32\ is denied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM