How to install/get started with MEF 2

849 views Asked by At

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?

1

There are 1 answers

0
Kat On BEST ANSWER

I had to add the System.ComponentModel.Composition.Registration assembly from the add references menu (doh).