我正在使用 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.
编辑: 关于定位 .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/