This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.
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:
Failed to replace the search service. Check the error log for more information.
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.
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: