Monday, 26 November 2018

Debug .NET Core 2.1 Azure Function V2 with Visual Studio 2017

Issue:

When you create a new .NET Core 2.1 Azure Function in Visual Studio and then try to debug it, you see the console pop up and disappear then you get this error:

A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x8000ffff. ErrorCode=0x0.

image

Workaround:

I’m sure Microsoft will resolve this soon but what you have to do to get around it is to configure the project debug properties and configure Visual Studio with the Executable to run and give it the path of func.dll. See steps below.

1) Install the Azure Functions Core Tools:

You can find more info here.

2) Right click your project, click on Properties and go to the Debug tab

3) Set the Launch type to Executable 

4) Set Executable to

5) Set the Application arguments

You settings should look like this when done.

image

Let’s go ahead and try debug our function and we can see it’s working now:

image

Happy coding!

3 comments: