Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Adding net47 target. #111
My first thought in addressing this issue was to hook the App Domain's assembly resolve event. However, it was never called in order to resolve this assembly (it works perfectly for Newtonsoft).
Looking at the loaded modules in the process, I did see two system.net.http assemblies. One that came from the Oidc nuget references (located in the same folder as my dll) and the other from.... wait for it... The freaking GAC!
This was with a clean powershell instance, so I didn't want to edit or create a config file for the powershell.exe. That seems like a bad idea. I can't control my consumers environment like that.
I was able to reproduce the exact issue with a simple net461 console app. You just had to remove the assembly redirect for system.net.http from the app.config.
There is a long list of related issues
I tried to involve @terrajobst since he is the expert on these things
So the main question is - should a net4xx build target reference the HttpClient nuget package - or the one from the .NET Framework. When you go through the above list, different people have different with one or the other.
OK - I pushed an update. If anyone wants to have a look.