I'm pretty experienced with all the assembly loading and resolution stuff that happens in .Net framework. But we have a problem.
I have an app (MVC web app), it loads a nuget package (P1) of ours that uses another nuget package (P2) of ourse that uses RestSharp 104.4.0 - the dll in that RestSharp package does not have a strong name.
The app has other packages that use RestSharp 106.6.5 - the dll in the RestSharp package has a strong name.
The app builds and runs but eventually throws an assembly load error because it can't find and load RestSharp 104.4.0
I tried a version override in the Web.config that didn't work and I think its because 104.4.0 has no strong name but 106.6.5 does.
So I contrived a solution where I dynamically force load RestSharp 104.4.0, that works and during app startup the assembly can be seen, loaded in the debug Modules window.
But when the code continue and accesses code in package P2, that throws because it can't find RestSharp 104.4.0 !!
I expected that to work, why is it trying to find and load RestSharp 104.4.0 when it has already been loaded by my "hack"?
For reasons I wont bore you with we cannot update and rebuild P2 to use RestSharp 106.6.5.