Ramesh Rajendran
Ramesh Rajendran

Reputation: 38683

MEF CS0234: The type or namespace name 'Composition' does not exist in the namespace 'System.ComponentModel' (are you missing an assembly reference?)

I have added in ComponentModel.Composition; assembly .But showing this error for

using System.ComponentModel.Composition;

and reference for the assembely

still gets the error

CS0234: The type or namespace name 'Composition' does not exist in the namespace 'System.ComponentModel' (are you missing an assembly reference?)

Upvotes: 5

Views: 3326

Answers (1)

Muhammad Musavi
Muhammad Musavi

Reputation: 2696

  1. First of all (if it's needed) Open your project in Visual Studio 2012 or later, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.

  2. Right-click on your Project and select "Add Reference". Find System.ComponentModel in the Framework list and add it or the applicable sub assembly.

Thats's all I did when I faced this problem.

Upvotes: 2

Related Questions