如何在64位窗口中运行PartCover [英] How do I run PartCover in x64 windows
问题描述
我试图运行PartCover来测试加利奥一些测试的覆盖范围上的Windows x64。然而试图运行它提供了以下错误。
I am trying to run PartCover to test the coverage of some tests with Gallio on windows x64. However trying to run it gives the following error.
检索COM类工厂组件具有CLSID {FB20430E-CDC9-45D7-8453-272268002E08}失败,原因是以下错误:80040153
Retrieving the COM class factory for component with CLSID {FB20430E-CDC9-45D7-8453-272268002E08} failed due to the following error: 80040153.
编辑:我使用PartCover 2.2.0
I am using PartCover 2.2.0
推荐答案
该问题是由PartCover尝试当它在64位.NET VM上运行加载32位的DLL。
The problem is caused by PartCover trying to load a 32 bit dll when it is running under the 64-bit .NET VM.
关键是要迫使PartCover在32位虚拟机上运行。为了做到这一点,你必须使用一个叫做CorFlags.exe工具来修改EXE和其标记为32位。这等同于它已经被建立以86作为其目标。
The trick is to force PartCover to run in the 32 bit VM. In order to do this you have to use a tool called CorFlags.exe to modify the exe and flag it as 32 bit. This is equivalent to it having been built with x86 as its target.
CorFlags(我的机器上)在程序Files \ Microsoft的SDK \的Windows \ v6.0A \ BIN \ 64 \
CorFlags (on my machine) is in Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\
要设置32位标志运行:
To set the 32-bit flag run:
CorFlags.exe PartCover.exe / 32BIT + /强制
CorFlags.exe PartCover.exe /32BIT+ /Force
我还发现,我不得不做同样的程序正在运行(在我的情况下公堂测试运行)
I also found that I had to do the same for the program being run (in my case the Gallio test runner)
这篇关于如何在64位窗口中运行PartCover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!