Skip to content

Add current directory to "Unable to find project root" error #1214

@ejizba

Description

@ejizba

We had an issue in the VS Extension (microsoft/vscode-azurefunctions#1175) where the user kept getting this error:

> Executing task: func host start <

Unable to find project root. Expecting to find one of host.json, local.settings.json in project root. The terminal process terminated with exit code: 1

This was the root cause as described by @petmat

I'm using Powershell as the integrated terminal in Visual Studio Code. Some time ago I set the profile file to do the following things:

Set-Location C:\

I did that because the default way Powershell works is that when you start it the default folder is the profile-folder in Windows and I would prefer it to be the root of the C-drive.

However this has an unwanted side-effect of forcing the integrated terminal in Visual Studio Code to always open in the same C:\ directory.

It feels like some of the headache could've been saved if the error message had the current directory in the message. Something like this:

Unable to find project root in folder "C:\". Expecting to find one of host.json, local.settings.json in project root. The terminal process terminated with exit code: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions