Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

asp.net

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?)

like image 416
Ramesh Rajendran Avatar asked Nov 12 '22 08:11

Ramesh Rajendran


1 Answers

  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.

like image 98
Muhammad Musavi Avatar answered Nov 14 '22 23:11

Muhammad Musavi