You can achieve this with the XDT Transform ( X ML D ocument T ). p>
Check out https://github.com/projectkudu/kudu/wiki/Xdt-transform-samples
Adding environment variables
Next, an environment variable named FOO with the value BAR will be entered and a folder will be added to PATH:
<?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <system.webServer> <runtime xdt:Transform="InsertIfMissing"> <environmentVariables xdt:Transform="InsertIfMissing"> <add name="FOO" value="BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" /> <add name="PATH" value="%PATH%;%HOME%\BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" /> </environmentVariables> </runtime> </system.webServer> </configuration>
Drop it as d:\home\site\applicationHost.xdt , restart the web application and check the fresh fixed %PATH% in Kudu ( https: //sitename.scm. Azurewebsites.net/DebugConsole ).
d:\home>set PATH Path=D:\home\site\deployments\tools;[...];D:\home\BAR
source share