MEF CS0234: The type or namespace name “Composition” does not exist in the namespace “System.ComponentModel” (do you miss the assembly reference?)

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

using System.ComponentModel.Composition;

and assembly link

error still appears

CS0234: The type or name of the Composition namespace does not exist in the System.ComponentModel namespace (do you miss the assembly reference?)

+4
source share
1 answer
  • First of all (if necessary). Open a project in Visual Studio 2012 or later, select Manage NuGet Packages from the Project menu, and search the Internet for Microsoft.Composition.

  • Right-click on your project and select "Add Link." Locate System.ComponentModel in the Framework list and add it or an applicable helper assembly.

That is all I did when I ran into this problem.

0
source

All Articles