In the following two MEF parts running in VS, the MEFv1Part gets both properties set to a non-null value, while the MEFv2Part only has the second property set to a non-null value.
Why is that? Is it by design of how MEFv2 attributes behave or a bug in VS-MEF?
[MEFv1.Export]
public class MEFv1Part
{
[MEFv1.Import(typeof(SAsyncServiceProvider), AllowDefault = true)]
public Microsoft.VisualStudio.Shell.IAsyncServiceProvider AsyncServiceProvider { get; set; }
[MEFv1.Import(typeof(SAsyncServiceProvider), AllowDefault = true)]
public object AsyncServiceProvider3 { get; set; }
}
[MEFv2.Export]
public class MEFv2Part
{
[MEFv2.Import("Microsoft.VisualStudio.Shell.Interop.SAsyncServiceProvider", AllowDefault = true)]
public Microsoft.VisualStudio.Shell.IAsyncServiceProvider AsyncServiceProvider { get; set; }
[MEFv2.Import("Microsoft.VisualStudio.Shell.Interop.SAsyncServiceProvider", AllowDefault = true)]
public object AsyncServiceProvider3 { get; set; }
}
In the following two MEF parts running in VS, the
MEFv1Partgets both properties set to a non-null value, while theMEFv2Partonly has the second property set to a non-null value.Why is that? Is it by design of how MEFv2 attributes behave or a bug in VS-MEF?