Are you using SimpleInjector by chance? It sounds like you have a dependency on a package that references an older version of the MVC libraries and that older version is getting pulled in instead of the current version. Firstly ensure all your packages are updated. Then check the output directory for your app and ensure the version of the MVC assembly is 6.0.
TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ITypeActivatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=6.0.0.0
Pavan Kumar
1
Reputation point
I am upgrading my current project from .NET Core 3.1 to .NET 6.0. After upgrade of project along with its dependencies, I am getting below error. I have tried to investigate but no luck.
Please help.
This project uses
Thanks,
Pavan.
3 answers
Sort by: Most helpful
-
-
Pavan Kumar 1 Reputation point
2023-01-05T15:32:01.867+00:00 I have understood by Castle.Windsor documentation, it does not support .Net 6.0, will you suggest any DI framework alternative to Castle.Windsor that supports .NET 6.0 and upgradable on future releases for .NET?
-
Pavan Kumar 1 Reputation point
2023-01-12T08:49:10.8066667+00:00 Thanks a lot for your response, I was able to replace the Castle with built in DI of .NET 6.0. Appreciate your help.