Unable to run Azure function app in local
Description:
Unable to run azure function app in local. I was able to run function app in local till two weeks ago. Suddenly started facing issue in running function app in local.
Getting below error in console on running function app in local. Tried multiple solutions suggested on internet. I have tried reinstalling and repairing VS 2022 multiple times. Even deleted all VS and dotnet files post uninstallation of VS and .net core but still no lock.
Below is the error getting in azure function app console when I run function app in local.
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
Failed to run as a self-contained app.
The application was run as a self-contained app because 'C:\Users\v-abjadhav\AppData\Local\AzureFunctionsTools\Releases\4.57.0\cli_x64\func.runtimeconfig.json' did not specify a framework.
If this should be a framework-dependent app, specify the appropriate framework in 'C:\Users\v-abjadhav\AppData\Local\AzureFunctionsTools\Releases\4.57.0\cli_x64\func.runtimeconfig.json'.
C:\Users\v-abjadhav\AppData\Local\AzureFunctionsTools\Releases\4.57.0\cli_x64\func.exe (process 11232) exited with code -2147450749.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
Please help as I am blocked in function app debugging.