In Visual Studio 10 I made a folder "lib" that sits along side my project folders. In this folder I placed the *.dll from MEF 2 Preview 5, and my application runs great. The problem is the WPF designer surface inside VS throws an Unhandled
exception (See Error Message Below) after a few clicks of the mouse. I can click "reload the designer" and it will again work for a few moments.
The apparent problem may not be completely related to MEF, but I thought someone here might have the problem. It appears that the designer cannot find the System.ComponentModel.Composition.CodePlex.dll in its search path. The following post seems
related, but the workaround did not work (http://connect.microsoft.com/VisualStudio/feedback/details/694333/vs-2010-c-form-designer-cant-find-native-dll-used-by-managed-control-is-my-hack-necessary). I also tried updating my Reference Path for the project
with no success.
Note: I am using WPF MVVM pattern, and importing/exporting with MEF. Also if I reference the .NET "System.ComponentModel.Composition" in my project the designer surface works properly.
WPF Designer displays this along with alot of stack information:
Type universe cannot resolve assembly: System.ComponentModel.Composition.CodePlex, Version=18.104.22.168, Culture=neutral, PublicKeyToken=13e5ffd4e05db186.