NUnit “missing” GPSVC.DLL on Windows 7/64

房东的猫 提交于 2019-11-30 03:08:31

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.

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).

Michael Mullan

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!