vs-mef icon indicating copy to clipboard operation
vs-mef copied to clipboard

ImportMany collection property has no setter, and it is always empty in the runtime.

Open lifengl opened this issue 6 years ago • 3 comments

I remember the bug #94 was fixed. But when I removed 'set', and imported collection becomes empty. I noticed it in a recent d16.0stg build.

lifengl avatar Mar 07 '19 18:03 lifengl

We have a test for what you describe:

https://github.com/Microsoft/vs-mef/blob/4bcbb4f5d7f02f91f4b1623911fc1bd727bcaa72/src/tests/Microsoft.VisualStudio.Composition.Tests/RejectionTests.cs#L101-L106

What is different about your case that leads it to fail?

AArnott avatar Mar 07 '19 19:03 AArnott

interesting, I hit this problem on a head of a MEF scope (UnconfiguredProjectImpl), so it is coming from ExportFactory<T>.CreateExport(). I wonder whether that makes any difference.

lifengl avatar Mar 09 '19 00:03 lifengl

Would you be willing to try adding a test for it to see if you can repro it?

AArnott avatar Mar 11 '19 20:03 AArnott