HTTP Error 500.30 - ANCM In-Process Start Failure

Hello everyone,
I am struggling with this problem for almost 5 days now. Getting this error as soon as I launch my web api solution in Google Chrome. The solution is built with .NET Core 3.1 .
Event Log shows:
Application ... with physical root ... failed to load coreclr. Exception message: CLR worker thread exited prematurely.
Tried the steps here https://github.com/dotnet/aspnetcore/issues/18230 . I am getting 10 warnings when building the solution about packages being restored using either .NET Framework 4.6.2 or 4.7 because they are not compatible with the target framework '.NETCoreApp, Version 3.1 . How do I fix these? How do I find out what version of a package is compatible with .NET Core 3.1 .
Thanks,
Saad