Solution:
The solution is very straight forward, just go to Microsoft dotnet-core website, download and install the run time along with hosting package and you are good to go.
I am using Dotnet-Core 2.1.11 on windows so I downloaded the package as highlighted below:

For some reason if you get the below error, that surely mean that you have installed wrong version of the dotnet-core, you don’t need to uninstall previously installed package for most cases, just install the correct version and you are good to go.
http error 502.5 – process failure asp.net core 2.1