'Can't inject IWebHostEnvironment in Azure Durable Funciton

I have an Azure Durable Function and want to use IWebHostEnvironment. But when I try to inject it into the HttpStart function or my orchestrator I get the error: Cannot bind parameter 'env' to type IWebHostEnvironment. Make sure the parameter Type is supported by the binding. I have not been able to find examples with Durable Functions and IWebHostEnvironment.

What I am trying to do is the equivalent of Server.MapPath(), which is not available in n.et core.



Solution 1:[1]

The trouble was that I was not getting errors but could not see the files in Kudo. They I found a post saying to set WEBSITE_DISABLE_SCM_SEPARATION = true, allowing Kudu to see the current process. Makes perfect sense after I thought about it for a moment.

Reference: https://serverfault.com/questions/788799/where-are-my-azure-temp-files

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 HariKrishnaRajoli-MT