We have an asp.net core application running on kestrel hosted in IIS on windows server 2008.
This application uses several base components and we are used to just install these components in the GAC and use assembly redirects to point all applications on the same server to the latest version of these components.
Everything runs fine when we deploy the application including all the necessary assemblies.
However, when we apply a redirect on a dotnet core assembly (we apply the redirect in the [app].exe.config, not the web.config) to a version that is installed in the GAC, we get a type exception ...
Application startup exception: System.TypeLoadException: Could not load type 'my.company.namespace.coolest.component.helpers'
Curiously enough, the redirects for the plain old dotnet4 assemblies work when specified in the [app].exe.config, only the redirect for the dotnet core assembly fails.
So, I'm now wondering. How are dotnet core assemblies resolved? Which locations are searched for ?
(And ultimately, is it possible at all to redirect to a dotnet core assembly in the GAC)
[EDIT 23/OCT/2017: Doh... turns out the latest dotnet core assembly from our team was bad.. so to answer my own question.. yes, assembly redirects (when specified in [app].exe.config) for dotnet core assemblies targeting full .net framework do work and ARE also searched from the GAC]
TargetFramework
in the csproj file). .NET Core does not use the GAC – Martin Ullrich