3
votes

I am trying to update a cloud service to use .NET 4.6. I changing the osFamily="4" to osFamily="5" in the .cscfg file as specified here: https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-guestos-update-matrix

Looking at my file system I have this SDK version installed:

  • C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.9

Looking at Web PI, I have these installed:

  • VS Community 2105 with Azure SDK - 2.9.6
  • VS Community 2105 with Azure SDK - 3.0
  • Microsoft Azure SDK for .NET (VS 2015) - 2.9.6
  • Microsoft Azure SDK for .NET (VS 2015) - 3.0

I normally use Powershell cmdlets to deploy using New-AzureDeployment/Set-AzureDeployment from a build & deployment server. I will occasionally deploy from my desktop using powershell for testing.

If I leave the osFamily="4" unchanged and deploy with Powershell everything works as expected.

If I use VS2015 and the Publish Azure Application tool to do the deployment it succeeds as expected if I choose either osFamily="4" or osFamily="5".

Checking which module is used:

C:\> (Get-Command Set-AzureDeployment).Module.Path
C:\Program Files\WindowsPowerShell\Modules\Azure\3.8.0\Azure.psm1

Running the deployment Set-AzureDeployment (given an existing package has been deployed) gives me the following error -

Set-AzureDeployment : BadRequest : The OS family 5 you are trying to deploy is not supported by the SDK package. The SDK package supported OS families:3,4,1,2,98. Please try to deploy to a different operating system. To do this specify a different osFamily and/or osVersion in your .cscfg file.

I don't see which SDK "package" the commandlet is complaining about...any ideas?

1
You have to create the cspkg with the new SDK as well. Did you?Martin Brandl
@MartinBrandl It must not be built with the SDK v2.9. I will look and see if we are hard coding the SDK version in our build steps.Tim Duncan
I read about the same error where the solution was to build the package with the new sdk.Martin Brandl
Does New-AzureDeployment behave any differently?bmoore-msft
@bmoore-msft I'm not sure what you mean by behave differently. I think martin-brandl is closer to the issue. I need to understand how my MSBUILD based packaging step decides which SDK to use...Tim Duncan

1 Answers

1
votes

Try using a newer version of the 2.9 Azure Authoring Tools.

I reproduced this problem with Azure Authoring Tools 2.9.1, but remedied it by upgrading to version 2.9.5.3. Actually it's mentioned as fixed in the release notes for Azure '3.0' SDK (download link):

Visual Studio now supports deploying Cloud Services to OS Family 5 (Windows Server 2016) virtual machines. For existing cloud services, you can change your settings to target the new OS Family. When creating new cloud services, if you choose to create the service using .net 4.6 or higher, it will default the service to use OS Family 5. For more information, you can review the Guest OS Family support table.