I'm having a fatal error when I want to debug an Azure Function. here are the steps to reproduce:
- Create a new Azure Function project.
- Select Azure Functions v2 (.NET Core) in the dropdown, then select Http trigger.
- Compile the generated template code and click on the debug button (F5) to get the error.
I'm having that issue with Visual Studio Community and Professional. I uninstalled and reinstalled multiple times by trying to clean as much as possible the cached Visual Studio files as suggested in here. I also tried to add/remove as many components in Visual Studio Installer without success. Azure Development is checked in Visual Studio Installer.
It seems that the compute emulator is having some compatibly issues with Visual Studio. Also, the generated project looks like this:
When I use the older version (v1) that is not using .NET Core, I have no issue to debug using the Azure Compute Emulator.