Search code examples
asp.net.netuwpmef

Does MEF support UWP projects?


i have been searching on whether UWP projects can be implemented with Managed Extensibility Framework.

On the GitHub depository of Prism, it says

MEF is supported with WPF for compatibility with previous versions. It will not be added to Windows 10 UWP or Xamarin Forms.

(It is for Prism.Mef. But, can it not be for MEF generally?)

on Microsoft Developer Network it is said:

MEF is an integral part of the .NET Framework 4, and is available wherever the .NET Framework is used. You can use MEF in your client applications, whether they use Windows Forms, WPF, or any other technology, or in server applications that use ASP.NET.

Is UWP included in "any other technology" part or with the "in server applications that use ASP.NET" part?

I know .NET Core is used for UWP applications, but that ASP.NET part confuses me.

Briefly,is it possible to write UWP applications with MEF? Answers with sources will be appreciated. Thanks.


Solution

  • It is for Prism.Mef. But, can it not be for MEF generally?

    For Prism.Mef only

    Is UWP included in "any other technology" part or with the "in server applications that use ASP.NET" part?

    UWP is included in "any other technology" part

    Briefly,is it possible to write UWP applications with MEF?

    Yes, by using the Microsoft.Composition NuGet package, we can easily integrate MEF in UWP app.

    Here is an article for Windows Store app(8.1), it is similar with UWP app.

    And this is a UWP MEF sample: Link