There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
I'm using MefContrib.MVC3 and have a rather bizar issue.
When i use DependencyResolver.Current.GetServices<T>() it returns my items twice.
I made an interface IStartupTask and decorated it with the InheritedExport(typeof(IStartupTask))
I have some base class implementing it and finally derive this into my concrete tasks, beside the interface i have no other attributes on these.
When I call DependencyResolver.Current.GetServices<T>().ToArray() it gives me 4 items, but I should have only 2.
Any clues on how I can debug/solve this ?
I tried to add PartCreationPolicy as shared, I would expect this to solve the issue (in a bad way i agree) but still 4 items are returning.
I've reflectored the code and did a couple of other tests. This seams to occure with anything that gets imported with ImportMany attribute also.