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

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



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:UsersPaulAppDataLocalAzureFunctionToolsReleases2.5.2clifunc.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:UsersPaulAppDataLocalAzureFunctionToolsReleases1.3.0clifunc.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?




3 Answers
3



I eventually got this to work by changing the settings in the Debug screen.



I changed Launch from Project to Executable



I set Executable to C:UsersxxxxAppDataRoamingnpmnode_modulesazure-functions-core-toolsbinfunc.exe



I changed Application arguments to start



I changed Working Directory to SourcedirectoryFunctionApp1FunctionApp1binDebugnetstandard2.0



I would still love to know where the Project settings were getting their values from though...



Debug Settings



How can I get this working?



In your case, it seems that there is no azure function tools v2 , please have a try to install it.


npm i -g azure-functions-core-tools@core --unsafe-perm true



Please also try to update the [Azure functions and Web Jobs tools] to latest version



tool->Extensions and updates



enter image description here



And then try to run the azure function, if there is no corrosponding version it will download it automatically.



enter image description here



Test Result



enter image description here



Update



Check the function tools from the path



C:UsersuserNameAppDataLocalAzureFunctionsToolsReleases


C:UsersuserNameAppDataLocalAzureFunctionsToolsReleases



enter image description here






Thanks for responding.

– Paul Dolphin
Sep 14 '18 at 19:06






I have followed your instructions - installed the latest azure functions tools 2 and checked I have the latest version of Azure functions and web jobs. Unfortunately I still get the same error. What has been configured to try to run func.exe from a location where it does not exist? What command should be run to run the azure function locally?

– Paul Dolphin
Sep 14 '18 at 19:09






@PaulDolphin Make sure that Azure function tools are updated to the most recent version. We could check the function tools in "C:UserstomsAppDataLocalAzureFunctionsToolsReleases"

– Tom Sun
Sep 17 '18 at 1:12







I have 2.5.2 installed - there are loads of files in that directory but no func.exe for some reason.

– Paul Dolphin
Sep 18 '18 at 8:01






It is very odd that if there is no func.exe file. We could found the func.exe is in the path C:UsersusernameAppDataLocalAzureFunctionsToolsReleases2.5.2cli

– Tom Sun
Sep 18 '18 at 8:27




I am able to get this working just by targeting .Net Standard 2.0.


.Net Standard 2.0



Just change to netstandard2.0 in the project file.



Application Settings



enter image description here



Debug Settings



enter image description here



There is no need of providing a path to the func.dll.


func.dll



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ