5

According to Support and Retirement Information for the Azure SDK for .NET and APIs, SDK 2.6 introduced support for .NET 4.6. None of the listed SDKs explicitly mention 4.6.2 though the sister article Install .NET on a Cloud Service Role includes an installation script that explicitly installs .NET 4.6.2, implying that it is supported for web/worker roles.

When I attempted to upgrade my solution from .NET 4.5.1 (using Azure SDK 2.8) to .NET 4.6.2, I also modified my RoleProperties.txt file which included the following lines:

TargetFrameWorkVersion=v4.5.1 RoleTargetFramework=v4.5.1

to

TargetFrameWorkVersion=v4.6.2 RoleTargetFramework=v4.6.2

which resulted in the following error after calling cspack.exe:

Unsupported .Net Framework v4.6.2

I tried changing the 4.6.2 to simply 4.6 and that similarly failed.

So my questions are:

  1. How do you correctly target .NET 4.6.2 using cspack.exe?
  2. Is it necessary to set those properties to 4.6* or is it safe to leave them at 4.5.1 since cspack.exe doesn't complain?
David Peden
  • 17,596
  • 6
  • 52
  • 72
  • Have you found any solution yet? I can currently package my application (.NET 4.6) with the newest SDK (2.9.5) but the deployment fails. For more info see disq.us/p/1dglsdr – Robar Nov 08 '16 at 11:01
  • Although I believe the error is effectively just a warning (the .nupkg is still produced), I have been unsuccessful in deploying my web/worker roles with 4.6+. I have yet to try with OS family 5 because because it requires Azure SDK 2.9.5.1+ which is [currently broken](http://stackoverflow.com/q/39372220/607701) and [not slated to be fixed until the end of November](https://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/#comment-2977814498). – David Peden Nov 08 '16 at 14:53
  • Reporting back that I successfully deployed my app on OS family 5 running .NET 4.6.2. I was never able to get self-installed .NET 4.6.2 to work. – David Peden Dec 11 '16 at 17:54
  • I have the same problem with cloud service, when targeting os family 5. The compilation of the cloud service fails with that error... – Omer Levi Hevroni Dec 18 '16 at 12:21
  • We found this which help us with similar issues: https://github.com/MicrosoftDocs/azure-cloud-services-files/tree/master/Azure%20Targets%20SDK%202.9 – Mr_road Oct 31 '17 at 10:30

0 Answers0