Skip to content

Investigate removing dependency on dotnet executable in the path #195

Open
@TylerLeonhardt

Description

@TylerLeonhardt

Right now, because the Azure Functions host calls the worker using:

dotnet ./path/to/worker/Microsoft.Azure.Functions.PowerShellWorker.dll

dotnet has to be in the path... Ideally, we shouldn't have to do this and either bundle the runtime with the worker or share the runtime with Azure Functions Host.

Firstly, we need the host to give us a way to run single executables:

Today we have to specify an executable path and a worker path:

{
    "description":{
        "language":"powershell",
        "extensions":[".ps1", ".psm1"],
        "defaultExecutablePath":"dotnet",
        "defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
    }
}

Ideally those would be the same thing:

{
    "description":{
        "language":"powershell",
        "extensions":[".ps1", ".psm1"],
        "defaultWorkerExecutablePath":"Microsoft.Azure.Functions.PowerShellWorker.exe"
    }
}

But, that would only work on Windows... so we'd need to be able to specify different executables on macOS and Linux so we can be cross platform:

{
    "description":{
        "language":"powershell",
        "extensions":[".ps1", ".psm1"],
        "defaultWorkerExecutablePath": {
            "windows":"Microsoft.Azure.Functions.PowerShellWorker.exe",
            "macos":"Microsoft.Azure.Functions.PowerShellWorker",
            "linux":"Microsoft.Azure.Functions.PowerShellWorker",
    }
}

I've already had to mention to a couple people that .NET SDK is required... and the Azure Functions Core Tools are moving away from the dependency on dotnet cli...

@pragnagopa @asavaritayal @fabiocav can you weigh in here?

(cc @SteveL-MSFT @joeyaiello @daxian-dbw)

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