我刚刚将我的项目升级到 Azure 2.6 SDK。我的角色在模拟器上开始,它们看起来运行良好。在我的构建日志中,我看到以下消息:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.6\Microsoft.WindowsAzure.targets(2695,5):警告 WAT250:项目“{0}”目标Microsoft Azure 虚拟机不支持“{1}”(OSFamily =“{2}”)。要确保角色启动,请更新服务配置文件“{3}”中的“osFamily”属性。请参阅http://go.microsoft.com/fwlink/?LinkId=262840来自更多信息。
这是我的 CFG 文件:
<ServiceConfiguration serviceName="CloudService1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2015-04.2.6">
我应该做点什么吗?
最佳答案
This link有 osFamily 信息。截至撰写本文时:
- 系列 6 - Windows Server 2019 - .NET Framework:3.5、4.7.2
- 系列 5 - Windows Server 2016 - .NET Framework:3.5、4.6.2
- 系列 4 - Windows Server 2012 R2 - .NET Framework:3.5、4.5.1
- 系列 3 - Windows Server 2012 - .NET Framework:3.5、4.5
- 系列 2 - Windows Server 2008 R2 SP1 - .NET Framework:3.5(包括 2.0 和 3.0)
Here是有关升级过程的文档。
关于c# - Windows Azure 计算机不支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31039250/