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:
- How do you correctly target .NET 4.6.2 using
cspack.exe
? - Is it necessary to set those properties to
4.6*
or is it safe to leave them at4.5.1
sincecspack.exe
doesn't complain?