NUnit“missing” GPSVC.DLL在Windows 7/64上 [英] NUnit "missing" GPSVC.DLL on Windows 7/64

查看:231
本文介绍了NUnit“missing” GPSVC.DLL在Windows 7/64上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从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位,还是我缺少一些明显的东西? p>

解决方案

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



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



解释是:



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



修复是对nunit控制台exe,你告诉窗口强制它运行在32位兼容模式。此链接显示了如何执行此操作。



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


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?

解决方案

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.

这篇关于NUnit“missing” GPSVC.DLL在Windows 7/64上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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