0

I was originally developing a project using the 4.6.1 Framework however one of the Nuget packages I wanted required the new 4.7.2 Framework to be used. As a result, I upgraded my project, which when attempting to run again and send a HTTP request gave me the error:

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Net.Http, 
Version=4.2.0.0, Culture=neutral, PublicKeyToken=**********' or one of its
dependencies. The system cannot find the file specified.'

How do I resolve this? (If I downgrade back to 4.6.1 it works, and I've also tried to uninstall and reinstall System.Net while using 4.7.2 Framework)

jazb
  • 5,498
  • 6
  • 37
  • 44
Explorex
  • 547
  • 6
  • 13

1 Answers1

0

In app.config change:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />

to

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
Doug Boone
  • 365
  • 1
  • 12