The 502.5 error is one that can manifest itself from a number of issues which can make it tricky to troubleshoot. The most frequent cause that I've run into myself is that I've upgraded the NuGet packages in my ASP.Net core site but have not actually installed that version of the .Net Core SDK on my workstation.
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
502.5 Process Failure
The solution as stated above is to download and install a copy of the SDK that matches up to the .Net Core NuGet packages you updated in Visual Studio (probably the newest stable release). Hope this helps!