EXECUTION_CONTEXT_FUNCTIONDIRECTORY env 变量不适用于 F# Azure Functions

EXECUTION_CONTEXT_FUNCTIONDIRECTORY env variable not available for F# Azure Functions

https://github.com/Azure/azure-webjobs-sdk-script/wiki/Retrieving-information-about-the-currently-running-function 描述了一个 EXECUTION_CONTEXT_FUNCTIONDIRECTORY 环境变量。但它不适用于 F# 函数。此外 Microsoft.Azure.WebJobs.ExecutionContext 不提供 FunctionDirectory 属性.

此示例函数确认 属性 确实存在:

let Run(req: HttpRequestMessage, log: TraceWriter, context: ExecutionContext) =
    log.Info context.FunctionDirectory
    req.CreateResponse(HttpStatusCode.OK, "Hello")

(在 v1 运行时的门户中测试)