c# - Azure 项目的 schemaVersion 错误

标签 c# azure

我在 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/

相关文章:

c# - 图像与位图图像与位图

c# - 以编程方式获取内容文件和主要输出

c# - 重载==和!=运算符,需要无限递归判断对象是否为null

c# - 如何限定 C# View 模型的范围

azure - FTP View 不显示通过 Azure DevOps 部署的文件

azure - 为什么 .show 查询在 Azure App Insights 日志查询中不起作用?

c# - Azure 数据库的 DATEADD 函数

c# - Windows Azure 上每分钟或每秒视频的成本

azure - 在 Azure 虚拟机、Visual Studio 2017 的服务器资源管理器中无法出现 "enable debugger"

python - 导入错误: No module named 'graphframes' databricks