3
votes

I'm having a fatal error when I want to debug an Azure Function. here are the steps to reproduce:

  1. Create a new Azure Function project. enter image description here
  2. Select Azure Functions v2 (.NET Core) in the dropdown, then select Http trigger. enter image description here
  3. Compile the generated template code and click on the debug button (F5) to get the error. enter image description here

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.

enter image description here

It seems that the compute emulator is having some compatibly issues with Visual Studio. Also, the generated project looks like this:

enter image description here

When I use the older version (v1) that is not using .NET Core, I have no issue to debug using the Azure Compute Emulator.

1

1 Answers

6
votes

Well... it seems that when we install/upgrade Visual Studio 2017, it does not install the latest version of the cloud extensions in Visual Studio 2017.

You need to go in Tools => Extensions and Updates...

And then update all the cloud extensions.

enter image description here