5

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

Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234

1 Answers1

1
  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.

Muhammad Musavi
  • 2,512
  • 2
  • 22
  • 35