Take the 2-minute tour ×

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.

Retrieving the COM class factory for component with CLSID {FB20430E-CDC9-45D7-8453-272268002E08} failed due to the following error: 80040153.

Edit: I am using PartCover 2.2.0

share|improve this question
add comment

1 Answer

up vote 16 down vote accepted

The problem is caused by PartCover trying to load a 32 bit dll when it is running under the 64-bit .NET VM.

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 (on my machine) is in Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\

To set the 32-bit flag run:

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)

share|improve this answer
The latest version of PartCover is now compiled and marked up as 32 bit and as such should not longer need this post build step. –  Shaun Wilde Jun 26 '11 at 21:13
What version is that? –  Peteter Sep 16 '13 at 13:53
add comment

Your Answer


