I have a .net core deployment that uses JSON Configuration Variables feature. When the appsettings.json contains
the value remains empty when I expected it to be populated from https://octopus.com/docs/deployment-process/variables/system-variables
Other normal project variables are substituted in the normal way so I know the feature is working. What’s the best way to put a system setting into my appsettings.json please?
Thanks for getting in touch! I’m sorry for the delay in getting back to you here. I have some information which I hope helps you out here.
I do not believe you are able to use System Variables in this method during deployment. Something you could do here is to enable the “Substitute variables in files” feature, then do the following in your config:
I tested this on my VM, when deploying to
Dev environment. The variable in the file was substituted and looked like this:
The following documentation page has some more information on the Substitute Variables in Files feature.
Let me know if you have any further thoughts or questions here.
Great, thanks for your help! I’ll use the suggested feature.
No worries at all! Please do not hesitate to get in touch at any time.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.