NUnit“缺失” Windows 7/64 上的 GPSVC.DLL

发布于 2024-08-13 15:54:34 字数 599 浏览 1 评论 0原文

我最近从 Vista/32 升级到 Win7/64。在我的旧机器上,一切正常。

不幸的是,在我的新机器上,NUnit 不会加载我的单元测试,并显示错误消息“System.IO.FileNotFoundException:无法加载文件或程序集“UnitTest”或其依赖项之一。系统找不到该文件指定”。 (实际上,我必须检查所有解决方案的项目并将它们设置为 32 位才能完成此操作。)

因此我加载了 Dependency Walker,它告诉我缺少 IESHIMS.DLL。我在我的机器上发现了两个,因此我从 Internet Explorer 目录中复制了 32 位版本,DW 不再抱怨该文件。

但是,它还缺少 GPSVC.DLL。我在 C:\Windows\System32 中只找到了一份该文件的副本,但是当我将其复制到单元测试目录中时,DW 抱怨它是 64 位的,并且 NUnit 仍然无法运行。现在,它还将 SYSNTFY.DLL 添加到缺失列表中。我只有其中之一,而且也是 64 位的。 NUnit 仍然报错。

那么我是否应该放弃这个 64 位操作系统并返回到旧的 32 位,或者我是否遗漏了一些明显的东西?

I recently upgraded from Vista/32 to Win7/64. On my old machine, everything was working fine.

Unfortunately, on my new machine NUnit won't load my unit tests, with the error message "System.IO.FileNotFoundException: Could not load file or assembly 'UnitTest' or one of its dependencies. The system cannot find the file specified". (Actually, I had to go through all of my solution's projects and set them to 32-bit to get this far.)

So I loaded up Dependency Walker, and it told me that I was missing IESHIMS.DLL. I found two on my machine, so I copied in the 32-bit version from the Internet Explorer directory, and DW stopped complaining about that file.

However, it's also missing GPSVC.DLL. I found only one copy of this in C:\Windows\System32, but when I copy that into my unit test directory, DW complains that it's 64-bit, and NUnit still won't run. It also now adds SYSNTFY.DLL to the missing list. I've only got one of those, and that's also 64-bit. NUnit still reports an error.

So should I scrap this 64-bit OS and go back to good-old 32-bit, or am I missing something obvious?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡莣 2024-08-20 15:54:34

我今天遇到了同样的问题,幸运的是有一个非常简单的修复和一个更复杂的修复。

简单的修复是运行 nunit-console-x86.exe,而不是 nunit-console.exe

部分解释的困难修复是:

发生的情况是 nunit 控制台运行程序正在 64 位模式下运行,这以某种方式阻止它加载您的单元测试 dll 处于 32 位模式。

该修复是针对 nunit 控制台 exe 进行的,您告诉 Windows 强制它以 32 位兼容模式运行。这个 link 向您展示了如何操作。

注意,您还需要下载 Windows sdk 才能获取 corflags.exe,请记住从 SDK 命令提示符运行该命令。

I hit the same problem today, luckily there is a very simple fix and a more complex one.

The simple fix is to run nunit-console-x86.exe, instead of nunit-console.exe

The difficult fix with a partial explanation is:

What is happening is the nunit console runner is running in 64bit mode, which somehow stops it from loading your unit test dlls which are in 32 bit mode.

The fix is made to the nunit console exe, you tell windows to force it to run in a 32 bit compatibility mode. This link shows you how to do it.

NB, you will need to download a windows sdk as well to get the corflags.exe, remember to run the command from the SDK command prompt.

奶茶白久 2024-08-20 15:54:34

我让它工作的唯一方法是将整个应用程序转换为 32 位目标,并在 32 位虚拟机上测试它。另外,DLL 必须位于本地(非网络)驱动器上,因为不允许在网络驱动器上进行调试(至少我无法让它工作)。

The only way I could get it to work was to convert my entire application to 32-bit target, and test it on a 32-bit virtual machine. Also, the DLLs had to be on a local (non-network) drive, because debugging is not permitted on network drives (at least I wasn't able to get it to work).

抠脚大汉 2024-08-20 15:54:34

Windows 有 64 位命令提示符,但您可以通过显式启动 c:\windows\syswow64\cmd.exe 来获取 32 位命令提示符。从那里您可以调用c:\windows\syswow64\regsvr32.exe,注册就会成功。

Windows has a 64-bit command prompt, but you can get a 32-bit one by starting c:\windows\syswow64\cmd.exe explicitly. From there you can call c:\windows\syswow64\regsvr32.exe and the registration will succeed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文