I'm trying to install Sitecore.Kernel version 10.0.0 on Visual Studio 2019 solution running on .net framework 4.8 and I get following error.
Severity Code Description Project File Line Suppression State
Error Failed to add reference. The package 'Microsoft.AspNet.WebApi.Client' tried to add a framework reference to 'System.Net.Http' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
Error HRESULT E_FAIL has been returned from a call to a COM component.
Based on the error it looks like it is an issue with dependency package 'Microsoft.AspNet.WebApi.Client'
failing to install 'System.Net.Http'
I tried the following to resolve the issue
- Installed
'System.Net.Http'
on its own - Tried to install
'Microsoft.AspNet.WebApi.Client'
, still I get the same error.
Any help around this issue is really appreciated.
System.Net.Http
to the project references will solve the issue? You need to also verify the .net framework version in your project settings.