I have an Azure Function project (created using VS 2017 15.3.4). I added the unit test project in the same solution (4.6.1). As soon as I add a link to my Azure function project, and I try to run my simple test case, I get this error "Failed to load the file or assembly System.Net.Http, Version = 4.1.1.0" when the MyFunction Run method starts.
Exceptional image I tried many recommended ones, but nothing works.
I tried adding a binding to the app.config file
<dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> </dependentAssembly>
I tried to add the nuget package for System.Net.http explicitly (from the latest version to several versions behind), but this does not help.
Has anyone been able to find a solution for this?
Thanks Sanjay
source share