Hi,
I have a project that was on .NET 4.0 using a MEF pre-release from about 2 years ago and we're trying to update it to .NET 4.5. The pre-release we were on doesn't work with .net 4.5, so we're attempting to update MEF to the latest, however it's failing while loading a generic interface type, that used to work:
[Import]
[Export( typeof( IRepository<,> ) )]
}
How can I work around this?
Thanks!
I have a project that was on .NET 4.0 using a MEF pre-release from about 2 years ago and we're trying to update it to .NET 4.5. The pre-release we were on doesn't work with .net 4.5, so we're attempting to update MEF to the latest, however it's failing while loading a generic interface type, that used to work:
[Import]
public IRepository<HealthCareDomain, LookupListCategory> Categories { get; set; }
Here's the class definition that it should be loading:[Export( typeof( IRepository<,> ) )]
[PartMetadata( ExportScope.Key, TransactionScope.Id )]
[PartCreationPolicy( CreationPolicy.Shared )]
public class Repository<TDomain,TEntity> : IRepository<TDomain,TEntity>, IRepository
where TEntity : class
{
...}
How can I work around this?
Thanks!