簡體   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