Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to run an Azure Function App locally from Visual Studio 2017 gives a 'func.exe does not exist' error

Tags:

function

c#

azure

I have created a new Azure Function app with an Http Trigger in Visual Studio 2017 (which I have just updated to v15.8.4). Using the generated function, when I try to run it I just get a message box with the error

The debug executable "C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\2.5.2\cli\func.exe" specified in the 'FunctionApp1' debug profile does not exist.

Sure enough there is no func.exe at that location, just a func.dll.

The file C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\1.3.0\cli\func.exe does exist.

I have successfully run an Azure function locally before but I assume updating Visual Studio a few times has broken something. How can I get this working?

like image 499
Paul Dolphin Avatar asked Sep 12 '18 22:09

Paul Dolphin


People also ask

How do I start Azure function locally?

Copy the settings file to the root of the Functions project next to the DLL, open a command prompt from there, and run “func start.” The Function will run based off the same trigger it would use if hosted in Azure or it can be manually triggered for testing using a local HTTP endpoint.


1 Answers

I Deleted AzureFunctionsTools and azure-functions-core-tools from C:\Users\ {YourUser} \AppData\Local. And ran the solution again it downloaded the same tools and then executed without errors.

like image 120
Rohit Majji Avatar answered Oct 13 '22 00:10

Rohit Majji