Azure-webjobs-sdk: JobHostConfiguration.IsDevelopment always returns false against MicrosoftAzure.Storage 8.x

Created on 29 Mar 2017  路  4Comments  路  Source: Azure/azure-webjobs-sdk

Another issue to be aware of for #1091

Reverting back to 7.2.1 fixed the issue.

bug

Most helpful comment

I found that setting the environment variable made no difference but, as a workaround, I found that adding a new key/value pair
<add key="AzureWebJobsEnv" value="Development"/>
in the app.config file under the appSettings section worked for me

All 4 comments

Thanks for referring to the original issue. Blocked behind supporting 8.x

@drchilds -- can you share how you were setting IsDevelopment? We look for the AzureWebJobsEnv environment variable to determine if development settings are applied -- did you have that variable set to 'development` and it still returned false?

I found that setting the environment variable made no difference but, as a workaround, I found that adding a new key/value pair
<add key="AzureWebJobsEnv" value="Development"/>
in the app.config file under the appSettings section worked for me

I'm having the same issue, but I found out that if I set the env. variable as Process instead of User or Machine then IsDevelopment is true. Is there a way the set the value for the user, i don't really want to add some #IF DEBUG statement in my code to set the env. var?

Edit: Well it turns out that restarting VS2017 after I set the env. variable fixed the problem

Was this page helpful?
0 / 5 - 0 ratings