Using Microsoft Moles and dynamics (DLR)

Situation

You want to use the ‘dynamic’ type in your unit-test.

Problem

An InvalidOperationException that says ‘Dynamic operations can only be performed in homogenous AppDomain.’ is thrown.

Solution

Changed the attribute ‘enabled’ of the node ‘legacyCasPolicy’ to ‘false’ in the following configuration file:

C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEPrivateAssembliesMicrosoft.Moles.VsHost.x86.exe.config

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.