繁体   English   中英

Azure项目的schemaVersion出错

[英]Error with schemaVersion of Azure Project

我在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工具版本,我们有不同的版本。 在我的计算机中(我得到错误的地方)我有azure工具2.3,而在另一台运行良好的计算机中,版本是2.2。

可能是azure工具版本的问题?

当我将角色添加到Azure云项目时,程序集:Microsoft.WindowsAzure.Diagnostics 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">

如果您正在使用两台不同的计算机,则需要保持同步。 要么将两者都带到2.3或还原。 请记住,作为升级的一部分,它可能已更改您尚未签入的配置文件。

最后它对我有用的是恢复Azure工具的版本,正如@Steve Newton所说。

如何恢复它在这里解释的版本:

http://social.msdn.microsoft.com/Forums/en-US/8701b03a-804f-4953-9ea0-01064aa4dc16/downgrade-from-18-tools-to-17?forum=azuretfs

我做的是:

1.修改.ccproj文件:以下两个标签将2.3更改为2.2。

< ProductVersion>2.2< /ProductVersion>

< CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.2\< /CloudExtensionsDir>

2.打开文件ServiceConfiguration.Cloud.cscfg和ServiceDefinition.csdef并更改其中的版本。

我有同样的错误

[我的配置:java / eclipse或jenkins / azure eclipseplugin / azure sdk]

ServiceDefinition.csdef (2, 128): Error  CloudServices051 : The XML specification is not valid: The 'schemaVersion' attribute is invalid - The value '2014-06.2.4' is invalid according to its datatype 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition:SchemaVersion' - The Enumeration constraint failed.

我使用Eclipse或控制台在我的工作站上没有错误但是我的Jenkins实例上出现了这个错误。 它可能是SDK之间的区别。 我用相同的SDK版本更新了两个(jenkins和我的工作站),但我保留了这个错误...... :(

我发现成功构建的唯一解决方法是从ServiceDefinition.csdef根元素中删除此属性。

<ServiceDefinition xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" name="AzureDeploymentProject">

在我的构建中,我保留以下警告但是包构建成功。

ServiceDefinition.csdef: Warning  CloudServices040 : The 'schemaVersion' attribute is unspecified. Please set the attribute to avoid this warning.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM