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

时间:2018-01-09 12:51:42

标签: azure-web-sites azure-functions azure-container-service

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属性。

1 个答案:

答案 0 :(得分:1)

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

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

(在v1运行时的门户网站上测试)