I want to use MEF 2 in a project. I'm trying to follow this guide to get started, but I cannot seem to get even the first snippet of code to run. The RegistrationBuilder
simply doesn't exist and I don't seem to have the System.ComponentModel.Composition.Registration
namespace that it's supposed to be in.
All I've done is install the Microsoft.Composition package from Nuget. I'm able to find the classes in the System.Composition
namespace fine, yet that doesn't seem to be enough to get started.
I'm using Visual Studio Professional 2013 with .NET 4.5.1. The project is a console project (although I also tried a Windows project), although the ultimate goal is to use this in ASP.NET.
What more do I need to do to get MEF2 working?
I had to add the
System.ComponentModel.Composition.Registration
assembly from the add references menu (doh).