在Azure云服务中支持.net 4.6或更高版本 [英] Supporting .net version 4.6 or higher in azure cloud service
问题描述
我有我正在使用azure sdk 2.9的云服务.它包含多个csproj文件.其中一个项目,我想迁移到.net版本4.6
I have my cloud service for which i am using azure sdk 2.9. It contains multiple csproj files. One of the projects, i want to migrate to .net version 4.6
当我升级项目并尝试部署服务时,出现错误,因为"Microsoft Azure Cloud Service项目仅支持在.NET Framework版本4.0和4.5上运行的角色".
When i upgrade the project and try to deploy the service, i get the error as "Microsoft Azure Cloud Service projects only support roles that run on .NET Framework versions 4.0 and 4.5"
我在Internet上阅读到,如果该服务使用Azure sdk 2.9,应该不会出现此错误,但是我无法在线找到任何帮助,因此我在此发布了此问题.
I read on on internet that if the service uses Azure sdk 2.9, this error should not come but i am unable to find any help online, hence i am posting this issue here.
推荐答案
要使用.NET 4.6,您需要确保您的云服务正在使用最新的osFamily
.
To use .NET 4.6, you need to ensure that your cloud service is using the most recent osFamily
.
osFamily
版本5
已安装以下.NET Framework:
osFamily
version 5
has the following .NET Frameworks installed:
4.0、4.5、4.5.1、4.5.2、4.6、4.6.1、4.6.2
4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2
您可以在ServiceConfiguration
中设置它:
<ServiceConfiguration
serviceName="MyService"
osFamily="5"
osVersion="*">
<!-- your role definitions in here -->
</ServiceConfiguration>
See the complete reference documentation: Azure Guest OS releases and SDK compatibility matrix
这篇关于在Azure云服务中支持.net 4.6或更高版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!