Ive been having a load of hassle trying to get Logic Apps to work in VS Code recently. I kept bumping into this issue when trying to F5 to build and run locally.

Action: azureLogicAppsStandard.getDebugSymbolDll
Error type: ENOENT
Error Message: ENOENT: no such file or directory, scandir 'C:\Program Files\Microsoft VS Code\%%%%%%

I worked out the problem was something to do with my machine setup and we all know how VS Code makes things simpler but also so much harder with all of the different versions of everything. Anyway whinging aside the problem turned out to be with the functions core tools.

What happened is that over time for different projects ive had the functions core tools installed and updated a few times.

I was under the impression that I could just use the prompt in vscode to update my function core tools but whenever I ran the functions id always see the same older version of the functions runtime spin up then the error would happen. You can see below that im running v3.0.2881 which was giving me some problems.

                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %

Azure Functions Core Tools (3.0.2881 Commit hash: fa9641ad925588192888bc977ff51d8a63536267)
Function Runtime Version: 3.0.14287.0

I think if you have a fully clean machine you can probably use the npm command in the vscode terminal and you should be good.

npm install -g azure-functions-core-tools@3 --unsafe-perm true

This will install the functions core tools into the following directory:

C:\Users\{user}\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin

I tried vscode suggestion to update which runs the npm command but every time I run it then I seem to still get this old version.

I knew I had it installed with chocolatey from an old project so I tried updating that with the below code, note using the x64 version flag.

choco install azure-functions-core-tools --version 3.0.3442 -y --params "'/x64'"

Again I seemed to get the old version of the tools when I run vscode.

Next I tried just installing the raw msi from this link:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v3%2Cwindows%2Ccsharp%2Cportal%2Cbash%2Ckeda#install-the-azure-functions-core-tools

Still when I run vs code it is running the old version.

I could also see if I start func.exe in the command window that it is the old version too. I now opened task manager to find the location of where func.exe is running from. I could now see its running from a chocolatey folder but its not the version I am expecting as ive updated it. I then run the choco list –localonly command to see what is installed and the below output shows me there are 2 different function core tools packages installed. Notice the slightly different names.


Chocolatey v0.10.15
azure-functions-core-tools 3.0.3442
azure-functions-core-tools-3 3.0.2881

I think what is happening is the path variable picks up azure-functions-core-tools-3 first so unless I explicitly set the path for func.exe I am getting this one. What I did next was to do a choco uninstall both of the function core tools packages.

choco uninstall azure-functions-core-tools-3
choco uninstall azure-functions-core-tools

I have other projects in normal VS which need function core tools so ill just keep installing with chocolatey rather than npm in vs code as I think that doesnt set the path variable so I think ill just have other problems elsewhere so I reinstalled function core tools with the below command.

 choco install azure-functions-core-tools-3 --version 3.0.3785 -y --params "'/x64'" 

After the install I can now run func.exe in a command window and see the new version is running.

Now I can go back to VS Code and F5 on my Logic App Standard project and it will compile and run func.exe and spin up my logic apps ready to run.

Now I am up and running, on reflection it was interesting to learn how I need to pay a little more attention to how things are installed and the dependencies between visual studio and vs code on things like the functions core tools. For me once I realised why it was running func.exe from a different place to where I thought it was and how the different ways you can set things up come into play. I guess it wouldnt have been a problem on a clean machine but these lessons help us learn useful tips and tricks for the future.

Im hoping this will save someone else a couple of hours troubleshooting, and also be aware while there isnt a lot of content I could find in the Logic App space covering this, there is the link below which talks about a similar set of symptoms with a slightly different cause. I did have that issue on my other computer too.

https://issueexplorer.com/issue/Azure/logicapps/348

 

Buy Me A Coffee