Visual Studio 2017 15.9.18 on Windows 10
I have an ASP.NET Core Project that I need to update the Target Framework from 2.1 to 2.2 After changing the Target Framework, I cleaned an re-built the project.
I now get a compile error saying that says one of the assemblies in my project uses 'Microsoft.AspNetCore.Http.Abstractions, Version=2.1.1.0 which has a higher version than referenced assembly 'Microsoft.AspNetCore.Http.Abstractions' with identity 'Microsoft.AspNetCore.Http.Abstractions, Version=2.0.1.0
In my project dependencies I have Microsoft.NETCore.App 2.2.0 installed. I was going to update this but in package manager the Update button is disabled, saying "Implicitly referenced by an SDK. To update the package, update the SDK to which it belongs." The versions available show they go up to 2.2.8
Using Nuget Package Manager I installed Microsoft.AspNetCore.Http.Abstractions 2.1.1.0 and that seemed to work in debug, but after publishing, my site fails to load.
Should I be manually updating the version of Microsoft.NETCore.App, or is it fine to just update the Microsoft.AspNetCore.Http.Abstractions?
I added the following to my project file:
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RuntimeFrameworkVersion>2.2.0</RuntimeFrameworkVersion>
</PropertyGroup>
I also noticed some invalid sections in my publish profile:
I also read somewhere that I should add: services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); but SetCompatibilityVersion does not appear as a method.