我将项目从 Azure 1.8 升级到 Azure 2.3(以及从 VS2012 升级到 VS2013)。我的源代码在 Azure 模拟器中编译并运行,但当 TFS 构建器尝试编译时,它会抛出此错误:(从云项目上下文菜单中执行“包”时出现相同的错误)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets (2016):尝试对“%(TargetOSFamily.Identity) 进行数字比较”在条件“'$(RoleTargetFrameworkMonikerIsValid)' == 'True' And '%(TargetOSFamily.Identity)' >= '3' And '$(RoleTargetFrameWorkIs35)' == 'True 下,计算结果为“”而不是数字' ”。
我已经设置了 osFamily="4"等,但没有任何改变。
最佳答案
服务配置文件的 ServiceConfiguration 元素必须设置 osFamily 和 osVersion 元素。设置它们后,必须重新启动 Visual Studio。这个问题讨论here .
关于azure - 尝试对 "%(TargetOSFamily.Identity)"进行数值比较,结果为 "",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24706860/