I am converting a DNX project to .net core. Because of dependency changes, I cannot use System.ComponentModel.Composition
anymore, instead must use .net core's ported version System.Composition
(which I believe is known as MEF 2).
However I could not find an equivalent functionality in MEF2 for setting the CreationPolicy
for singleton.
In MEF1, the code is
[PartCreationPolicy(CreationPolicy.Shared)]
How can you do this in MEF2?