Does MEF require .NET 4?

前端 未结 2 1131
忘掉有多难
忘掉有多难 2021-01-17 10:39

I am using Visual Studio 2010, try to create a MEF application. Does this require .NET 4.0 or can I target .NET 2.0?

2条回答
  •  迷失自我
    2021-01-17 11:14

    Yes you do:

    Application requirements change frequently and software is constantly evolving. As a result, such applications often become monolithic making it difficult to add new functionality. The Managed Extensibility Framework (MEF) is a new library in .NET Framework 4.0 that addresses this problem by simplifying the design of extensible applications and components.

    From: http://mef.codeplex.com/

    Edit: The question about targeting .net 2.0 is answered here:

    http://mef.codeplex.com/Thread/View.aspx?ThreadId=54008

    MEF is not supported on .NET 2.0 as it depends on LINQ and Expression trees. Currently we do not have a .NET 2.0 version of MEF planned.

提交回复
热议问题