If you are using .NET 5 or higher adding <FrameworkReference Include="Microsoft.AspNetCore.App" /> to your app library should help. Probably this line is somewhere in your SharedKernel project.
.NET 5
<FrameworkReference Include="Microsoft.AspNetCore.App" /
SharedKernel