You should update the Microsoft.NET.Sdk.Functions library from NuGet up to 4.5.0
Then follow these instructions: https://itsallinthecode.com/fixing-there-is-no-functions-runtime-available-in-visual-studio. You have to go to Tools > Options > Project and Solutions > Azure Functions > Click on "Check for updates" And when the "Download & Install" button appears, just click it, wait few seconds and relaunch the local functions, they should work