Nuget package for System.Net.Http on .NET Framework 4.7.2

  • Thread starter Thread starter Nedim
  • Start date Start date
N

Nedim

Guest
Application with a dependency to the System.Net.Http Nuget package may break after upgrading .NET Framework version to 4.7.2 or a newer version. This issue occurs if you are using Visual Studio 15.5 or a higher version.



The application may throw an error like this:

Initialization failed
Failed to replace the search service. Check the error log for more information.
at Telerik.Sitefinity.Services.Search.SearchModule.RegisterService


medium?v=1.jpg



Workaround


Apply the workaround mentioned in this document first.



Another workaround is to use a Visual Studio version that is lower than 15.5 may get the application working but this is not recommended. Older versions of Visual Studio may present security issues to your organization. They are also not supported by Microsoft.



Solution



The recommendation is to use System.Net.Http DLL that comes with .NET Framework.



If your application throws errors when you switch Nuget DLL with platform DLL, it means it is not compatible with the new libraries. Coding changes will be required to make it compatible.



If you see BadImageFormatException for System.Net.Http or other libraries when you access your web application, check this post out:

Fusion Log Viewer (fuslogvw.exe)

Continue reading...
 
Back
Top