I posted this to Castle:
-- start
I'm using the MoQ framework which uses castle to proxy types.  I'm
getting a BadImageFormatException when attempting to proxy the
IUnityContainer interface of the Enterprise Library's Unity block.
The odd thing is that the exception is thrown when I'm running my
tests, but when I switch to debug in order to examine the exception,
the exception isn't thrown and the tests pass.
I've been scanning related posts, but I haven't found any information
to help me out.  I also can't find out what version of Castle is
being
used, but I believe it is the latest stable build.
--end
They said, "ask kzu."  Wow, that was helpful.