.NET Core API sharing class libraries with ASP.NET MVC Framework(Episerver) structure map issue

Vote:
 

Hi!

I am currently working on upgrading our business API to .NET Core. The API uses 3 class libraries which   have also upgraded to .NET Standard. Now, the problem is, that the Episerver project, also uses these 3 class libraries and I am having trouble getting our StructureMap dependency injection to work with the .NET standard classes. For instance, I have a CacheManager class in one of the class libraries, that uses IMemoryCache. How can I Instantiate that from StructureMap?

I could also wait with upgrading the API until episerver supports .NET core, but then I will have to either start from scratch with upgrading all of the projects to .net core or keep my .net core git branch in sync with new changes until episerver support .net core and I can upgrade all of my projects. I hope you understand my issue :)

Thanks!

#248618
Feb 15, 2021 7:55
Vote:
 

If you have put your API project & Episerver solution then I would wait until Epi supports .NET core (I do not know the timeline)

I found following blog post that discusses referencing 2 DLLs of different version in a single application (https://devnet.kentico.com/articles/referencing-multiple-versions-of-the-same-assembly-in-a-single-application)

We have .NET core-based APIs that interact with Episerver but these APIs are in separate solution and hosted separately. We build these APIs for our integration layer. 

#248654
Feb 15, 2021 14:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.