0

I would like to implement Push Notification function so installed Microsoft.Azure.NotificationHubs in Visual Studio. However, there is version error prompt out when I launched my software in debug mode:

FileLoadException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral

DaiKeung
  • 1,077
  • 1
  • 19
  • 38

1 Answers1

0

You didn't mention what framework you were using. I was able to create a console .NET 4.6.1 console app and was able to debug without issue. Since you are getting a FileLoadException, I would suggest using fuslogvw to see why the binary isn't being loaded. The notification hub package may replace the System.Net.Http NETFX version with it's own version, in which case you could remove the package and add it back.

Ryan Hill
  • 1,821
  • 2
  • 8
  • 21
  • Thanks Ryan for reply. It is .Net 4.6.2. I tried to upgrade to .NET 4.7.2 with problem (local run is okay without issue), may you help on https://stackoverflow.com/questions/56577639/after-migrate-net-framework-from-4-6-2-to-4-7-2-azure-cloud-services-is-not-wo ? – DaiKeung Jun 14 '19 at 05:36