New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEF and open generics using ConventionBuilder #18047
Comments
I think I got the bug solved, unit test enhanced. Sorry for the commit with the short message, fixed that :) |
conventions.ForType(typeof(Logger<>))
.SelectConstructor(c => c.Single())
.Export(); But, as you've pointed out, it's not working here. The delegate is invoked with the list of constructors from |
I already found the source of the problem for the To be honest the problem is not rooted in |
@TMiNus do you have a fix? We would be happy to take it ... |
I assume it was fixed by dotnet/corefx#15315. |
I have this bug, I'm using System.Composition v 1.2 in a netcopreapp2.1 |
@danielmeza it was supposed to be fixed in 2.0. |
I am trying to use MEF with open generics without markups attributes, this is an example of the problem
To create the container I do
With that code I am getting a No importing constructor was found on type 'Logger`1[System.Object]' exception
If I mark the constructor with the attribute it works as intended but this should be possible without using markups
I have also tried this on the MEF version that ships with .NET40 and it works without the markups
My findings about the issue
The text was updated successfully, but these errors were encountered: