Closed astrohart closed 3 years ago
Just a quick update, I did a fork of this project and then cloned it to my local machine. Then, out of an abundance of caution, before building, I deleted the .git
folder from the cloned repo to ensure that any remotes are also purged. This way there is very little chance of a screw up.
Hi @astrohart,
Thanks for posting the issue. I want to say it seems like a binding issue. As you might know, the part of the CLR that is responsible for loading assemblies is called the Fusion loader. When the runtime needs to load a Type
; Fusion is invoked to find the DLL responsible for that Type
.
What it sounds like to me is; something in your project has a hard reference to a .NET framework assembly: System.Net.Http, Version=4.2.0.0
at this exact version.
Some things to check:
System.Net.Http.dll
; do you have it in the bin folder? What version is it?System.Net.Http
. Is there any build XML that instructs MSBUILD to use this "specific" version?System.Net.Http
to load.Let me know what you find.
Thanks, Brian
Version Information
What is the expected behavior?
That the following code works:
What is the actual behavior?
Instead, it throws a
FileNotFound
exception:System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at Flurl.Http.FlurlClient..ctor(String baseUrl)
I am using
Flurl
3.0.1 andFlurl.Http
version 3.0.1 NuGet packages.Any possible solutions?
Tried doing a
Update-Package
on my Solution in the Package Manager Console and deletingbin
andobj
folders and doing a Restart of Visual Studio.How do you reproduce the issue?
Just by running the code.
However, the following Unit Test passes:
BTW - the asterisks in the listing above are just for security purposes. I am passing a valid API key and secret here.
Do you have a unit test that can demonstrate the bug?
No. Like I said earlier, I am baffled by this. I know this is around where the error is occurring because I've done logging down to this point.,
Can you identify the location in the source code where the problem exists?
Basically, but I get an error in my library source code and I do not receive an error during unit testing.
If the bug is confirmed, would you be willing to submit a PR?
Yes, absolutely. One concern I would have is, there seem to be pre- and post-build events configured to automatically push changes to GitHub on build. If I were to fork, I'd also need guidance on how to properly disable such code for testing purposes. The extensions or build events appear to push directly to your master, even from a fork.