Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

was following a tutorial on pex and moles ( Its a year old, but everything worked fine until I changed Mole types to Behaved types. Once I did that, 'Run Pex Explorations' command started throwing this exception:

Could not load file or assembly 'System.Moles, Version=, Culture=neutral, PublicKeyToken=0ae41878053f6703' or one of its dependencies. The system cannot find the file specified.

I tried multiple solution (including Moles and SharePoint Behaviour types). I also tried to generate Moles for System assembly, but that fails with multiple 'cannot find suitable method to override' errors.

I'm using the latest version on pex (0.94) and moles ( Is there any solution for this?

share|improve this question
i got it working by copying all behaved types into my test project and referencing Microsoft.ExtendedReflection, System.Moles 2.0, and System.Web 2.0. Is there a better way to get this to work? – Necros Aug 17 '11 at 7:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.