I am upgrading an old VS project that was built using Sitecore 7.2. I have changed the target .NET Framework to 4.7.1. Now I am trying to install Sitecore.Kernel v9.1.1 via Nuget. However when I try to do that I get the following error:
Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 2.1.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.1', but the package does not contain any assembly references or content files that are compatible with that framework.
I have also attempted to install the
Microsoft.Extensions.DependencyInjection.Abstractions package separately but I get the same error. No matter what I do I can't install
Microsoft.Extensions.DependencyInjection.Abstractions. What's really strange is that if I create a brand new solution that targets .NET 4.7.1 I can install if fine. So there must be something strange in my existing project/solution that is preventing me from installing