logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

"Unable to determine function project root folder" when trying to open Logic App Designer.

Open razneruk opened this issue 3 years ago • 5 comments

Hi,

I've currently got a solution in Visual Studio 2019 which contains several Logic Apps and Azure Functions for different systems and I'm currently investigating if it makes sense to migrate this to VSCode and the new Logic Apps (Standard) extension but I've ran into the below issue.

The Logic Apps in the Visual Studio solution are currently organised by Solution Root / Artifact Type / System / Message / Interface, so like this:

LogicApps

  • System1
    • MessageType1
      • LogicApp1
      • LogicApp2
    • MessageType2
      • LogicApp1
  • System2
    • MessageType1
      • LogicApp1

This helps to keep things nicely organised as additional systems and message types will be added in the future and has been working fine for us. If I try and create the same kind of structure in VSCode though I find that I can create the Logic App projects fine using the extension, but trying to then open the new Logic App with the designer causes an "Unable to determine function project root folder" error to appear.

I've created a couple of test setups and found that I consistently receive this error if the Logic App workflow.json file is more than 3 folders deep. So "RootFolder \ LogicApps \ Stateful \ Stateful1 \ workflow.json" will generate this error, whereas "RootFolder \ LogicApps \ Stateful1 \ workflow.json" will work and open in the designer.

Now, as I'm pretty new to VSCode there's a very real possibility that this is due to how I'm setting the folder structure up, but even so I wouldn't expect the folder depth to throw errors.

Working : image

Not Working : image

Thanks in advance.

Does this occur consistently? Yes Repro steps:

  1. Create a new Logic App that is contained in a folder 3 levels deep.
  2. Right click the created workflow.json file and click 'Open in designer'

Action: azureLogicAppsStandard.openDesigner Error type: Error Error Message: Unable to determine function project root folder.

Version: 1.0.0 OS: win32 OS Release: 10.0.19042 Product: Visual Studio Code Product Version: 1.56.2 Language: en

Call Stack
OpenDesignerForLocalProject.<anonymous> extension.bundle.js:2:4518057
fulfilled extension.bundle.js:2:4517112

razneruk avatar Jun 07 '21 12:06 razneruk

Any updates on this issue? I have a similar issue which is not convention

samuelya avatar Aug 02 '21 04:08 samuelya

@razneruk Thanks for reporting this bug, I can reproduce the same error following the step you provide, I will report this to the Product Team.

zhangadreedom avatar Aug 09 '21 09:08 zhangadreedom

Hello @samuelya @razneruk , for this issue, looks like the Logic App Standard extension can't determine the project root path. As a workaround, you can open the VSCode workspaceFolder to Stateful folder and open the design UI.

zhangadreedom avatar Aug 10 '21 03:08 zhangadreedom

Hello @samuelya @razneruk , for this issue, looks like the Logic App Standard extension can't determine the project root path. As a workaround, you can open the VworkspaceFolder to Stateful folder (sub folder) and open the design UI? Or disable compactFolders feature when creating Logic App

zhangadreedom avatar Aug 10 '21 09:08 zhangadreedom

I managed to find a setting that did resolve this issue for me. Example structure:


root
└─── LogicApps
     └─── LogicApp1
     │    └─── Stateless
     │            workflow.json
     └─── LogicApp2
          └─── Stateful
                  workflow.json

  • Open or add the file: <folderRoot>\.vscode\settings.json
  • Add the setting: "azureLogicAppsStandard.projectSubpath": ".\\LogicApps\\"

Be careful though, local.settings.json will be created in this folder instead so not sure if it's ment to be used for multiple projects.

yoHasse avatar Sep 16 '22 10:09 yoHasse

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 21 '22 08:10 github-actions[bot]