简体   繁体   中英

az cli how to set webapp runtime

I am aware that, from a Windows environment, I cannot set my webapp to dotnetcore runtime due to the following bug: https://github.com/Azure/azure-rest-api-specs/issues/7688

However I'm trying to do it this way:

az resource create -g my-rg --resource-type "Microsoft.Web/sites/config" -n my-app --properties '{""siteConfig"": { ""metadata"": [{""CURRENT_STACK"": ""dotnetcore""}] }}'

There's no error message. But when I go to the azure portal, I see that the stack is not set to dotnetcore and remains on current value (dotnet). Is it the correct way to change the stack?

You can use the code below:

az resource create -g my-rg --resource-type "Microsoft.Web/sites/config" -n my-app --properties "{\"siteConfig\": { \"metadata\": [{\"name\":\"CURRENT_STACK\",\"value\":\"dotnetcore\"}] }}"

I test it at my side, it can change the runtime:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM