Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureWebJobsScriptRoot variable is not defined on Azure Functions #1146

Closed
PingPongSet opened this issue Mar 10, 2019 · 3 comments
Closed

AzureWebJobsScriptRoot variable is not defined on Azure Functions #1146

PingPongSet opened this issue Mar 10, 2019 · 3 comments

Comments

@PingPongSet
Copy link

PingPongSet commented Mar 10, 2019

AzureWebJobsScriptRoot variable is not defined on Azure Functions. The code below returns no value.
System.Environment.GetEnvironmentVariables(EnvironmentVariableTarget.Process)["AzureWebJobsScriptRoot"];

However, %HOME%\site\wwwroot will be returned based on below:

AzureWebJobsScriptRoot

AzureWebJobsScriptRoot

The path to the root directory where the host.json file and function folders are located. In a function app, the default is %HOME%\site\wwwroot.
Key Sample value
AzureWebJobsScriptRoot %HOME%\site\wwwroot

It returns correct value locally, not %HOME%\site\wwwroot

Update

Is this a bug with Azure Functions?

If so, what is an alternative solution?

Before the issue is fixed by Microsoft, can this variable, AzureWebJobsScriptRoot, be defined myself to "%HOME%\site\wwwroot" on Azure?

@PingPongSet PingPongSet changed the title AzureWebJobsScriptRoot variable has no value AzureWebJobsScriptRoot variable has no value on Azure Functions Mar 10, 2019
@PingPongSet PingPongSet changed the title AzureWebJobsScriptRoot variable has no value on Azure Functions AzureWebJobsScriptRoot variable is not defined on Azure Functions Mar 11, 2019
@ColbyTresness ColbyTresness added this to the Active Questions milestone Mar 13, 2019
@ColbyTresness
Copy link

@brettsam to take a look

@KetanChawda-MSFT
Copy link

Possibly duplicate of this doc issue. MicrosoftDocs/azure-docs#26761

@ColbyTresness
Copy link

Yeah this is a dupe, leaving on other issue until a verdict is reached there as to whether there's anything to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants