c# - MEF 是否需要 .NET 4?

标签 c# .net visual-studio visual-studio-2010 mef

我正在使用 Visual Studio 2010,尝试创建一个 MEF 应用程序。这需要 .NET 4.0 还是我可以面向 .NET 2.0?

最佳答案

是的,你这样做:

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.

来自: http://mef.codeplex.com/

编辑: 关于定位 .net 2.0 的问题在这里得到回答:

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.

关于c# - MEF 是否需要 .NET 4?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2811642/

相关文章:

c# - Swashbuckle OperationFilter 添加类型对象的参数

.net - 如何创建处理程序

c# - 为什么 AutogenerateBindingRedirects 不适用于 Visual Studio 2017 中的 Web.config

javascript - 验证 (HTML5) : Attribute 'X' is not a valid attribute of element 'Y'

c# - 在层边界上记录异常

c# - Roslyn AdhocWorkspace 要求引用 System.Runtime

c# - IEnumerable<T> 和 Take(x) 问题?

.net - DisplaySettingsChanging 上的 WPF 互操作死锁

Python 仪器驱动程序

c# - session 变量在不同浏览器之间共享吗?