You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Redirects option is on and you install the package Microsoft.Net.Http in a .NET 4.5 project you'll get a wrong binding redirect.
The package contains 2 extensions assemblies for .NET 4.5 and 3 for .NET 4.0.
During install on a .NET 4.5 project it will also add the redirect for the System.Net.Http assembly that is already in the GAC (and not in the package's 4.5 folder, only in the package's 4.0 folder).
@forki - I think that this is due to the way that we pick the appropriate assembly when there are multiple versions in the package - it was smartened a bit with a previous issue (can't remember which one) but looks like it needs some more work. I'll try to have a look at this one today or over weekend,
let x = System.Net.Http.HttpClient().GetStringAsync("http://www.bbc.co.uk") |> Async.AwaitTask |> Async.RunSynchronously
which worked fine. So I can't actually reproduce the issue - can you give some more details on how to repro it?
What I've noticed is: -
As you say, System.Net.Http does not exist in the net45 folder, only in the net40, yet we still get a binding redirect for System.Net.Http. This to me seems like it shouldn't be there as it's probably only required for a different framework. /cc: @forki does this mean that we need to start having conditional binding redirects?
I noticed an ensureRedirects.xml file in the package - no idea what that's doing there or if it has some special meaning for nuget.
There is no version 2.2.28.0, in .NET 4.5 there is version 4.0.0.0 in the GAC.
The resulting exception:
System.IO.FileNotFoundException was unhandled by user code
HResult=-2147024894
Message=Could not load file or assembly 'System.Net.Http, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source=Neo4jClient
FileName=System.Net.Http, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Activity
forki commentedon Feb 13, 2015
/cc @isaacabraham
isaacabraham commentedon Feb 13, 2015
@forki - I think that this is due to the way that we pick the appropriate assembly when there are multiple versions in the package - it was smartened a bit with a previous issue (can't remember which one) but looks like it needs some more work. I'll try to have a look at this one today or over weekend,
isaacabraham commentedon Feb 14, 2015
Just ran an empty net45 project with the single paket dependency
Microsoft.Net.Http. I got the following binding redirects: -paket.lock is as follows: -
The only assemblies that are referenced in the project, are: -
In
main _I called:which worked fine. So I can't actually reproduce the issue - can you give some more details on how to repro it?
What I've noticed is: -
ensureRedirects.xmlfile in the package - no idea what that's doing there or if it has some special meaning for nuget.dnauck commentedon Feb 16, 2015
Hello,
this is the problem:
There is no version 2.2.28.0, in .NET 4.5 there is version 4.0.0.0 in the GAC.
The resulting exception: