mannaggia
mannaggia

Reputation: 535

In cmdlet Set-AzWeAppSlot what are the values for NetFrameworkVersion?

I'm using Set-AzWeAppSlot in Powershell to set some config options on an AppService slot.

One of the options in this cmdlet is -NetFrameworkVersion.

I want to set it to .NET Core. But the docs do not give any clue about the values that can be specified.

I looked at an ARM template and it had "dotnetcore" so I tried that, but I get:

 Set-AzWebAppSlot: Operation returned an invalid status code 'BadRequest'

Any ideas what value I need to use for .NET Core?

Upvotes: 0

Views: 240

Answers (1)

Joy Wang
Joy Wang

Reputation: 42063

The Set-AzWebAppSlot does not have a built-in parameter to set the .NET Core, try this:

$PropertiesObject = @{
        "CURRENT_STACK" =  "dotnetcore"
    }
New-AzResource -PropertyObject $PropertiesObject -ResourceGroupName <group-name> -ResourceType Microsoft.Web/sites/slots/config -ResourceName "<appservice-name>/<slot-name>/metadata" -ApiVersion 2018-02-01 -Force

enter image description here

Check the result in the portal:

enter image description here

Upvotes: 1

Related Questions