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
Depending on Microsoft.AspNetCore.Authentication 1.1.0 causes a failure to resolve System.Net.Http when targeting the full framework. #1046
Depending on Microsoft.AspNetCore.Authentication 1.1.0 causes a failure to resolve System.Net.Http when targeting the full framework.
Minimal repro steps
I have attached a project that reproduces the issue.
The application should use System.Net.Http == 4.3.0 as defined in NetStandard 1.6.1 which correctly works on both the core and full framework.
The application doesn't copy any System.Net.Http dll into the output folder.
The application will crash with FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Further technical details
With the release of Asp.NET Core 1.1 the issue is fixed across all the packages I'm using except for this one. I believe it's related to this entry in your project.json file.
Building a custom version of Microsoft.AspNetCore.Authentication without the dependency on "System.Net.Http" from the framework does fix the issue for me.
I'm having this issue on a aspnetcore 1.1 app in VisualStudioCode (on my mac) targeting dotnet 5.6 and portable-net45+win8. Just upgraded this app from aspnetcore 1.0, where the reference to System.Net.Http worked fine.
It sounds like you have some kind of work-around, but I'm not sure I understand it. Can you elaborate?
This appears to be a packaging issue with our Authentication package. I've updated @muratg and @pranavkm with some information on it, and we'll investigate how best to fix this issue. Unfortunately I haven't been able to find a good workaround, short of downgrading back to