我在 TFS 中有一个 Azure 项目,以前运行良好。
我刚刚获得最新版本并重建了项目,现在我获得了以下版本:
Error 131 The XML specification is not valid: The 'schemaVersion' attribute is invalid - The value '2013-10.2.2' is invalid according to its datatype 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition:SchemaVersion' - The Enumeration constraint failed. D:\TFS_BOIRA\PROPPOSV3\BACKEND\ServiceLayer.Azure1\ServiceDefinition.csdef 2 125 ServiceLayer.Azure1
相同的配置在另一台计算机上运行良好。
我检查了两台计算机的 Azure Tools 版本,发现版本不同。 在我的计算机(出现错误的地方)中,我有 azure tools 2.3,而在另一台运行良好的计算机中,版本是 2.2。
可能是azure工具版本的问题吗?
当我将角色添加到 Azure 云项目时,程序集: Microsoft.WindowsAzure.诊断 Microsoft.WindowsAzure.ServiceRuntime
已更新至版本 2.3.0.0,我需要在版本 2.2.0.0 中使用它们。
我是否必须将我的 Azure 工具重新安装到版本 2.2?
谢谢
最佳答案
除了 Ingrid 的回答之外,您还需要获取 ServiceDefinition (.csdef) 和 ServiceConfiguration (.cscfg) 文件中的最新架构版本,并且仅更改原始版本值(例如 2.3)是不够的,您还需要新版本日期:
2.3: schemaVersion="2014-01.2.3"
2.4: schemaVersion="2014-06.2.4"
<ServiceConfiguration serviceName="MyCoolCloudProjectName" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4">
<ServiceDefinition name="MyCoolCloudProjectName" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
关于c# - Azure 项目的 schemaVersion 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25724155/