项目升级到SDK 2.6后有很多架构警告

时间:2015-06-10 08:08:19

标签: azure visual-studio-2013

将我的云项目升级到Azure SDK 2.6之后。 (通过项目属性窗口中的按钮),一切正常,但我得到了* .cscfg文件的数百个警告:

The complexType 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration:AccessControlElement' has already been declared.
The complexType 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration:AddressAssignmentsElement' has already been declared.
The complexType 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration:Certificate' has already been declared.

等。更多元素。

已经尝试过Clean,Rebuild,close-open VS ......但没有成功。它不会影响项目的功能,但让错误列表充满这些东西真的很烦人。

知道什么是错的以及如何解决它?

1 个答案:

答案 0 :(得分:7)

好的,所以来自MSDN forums的人帮我解决了这个问题。

  1. 检查服务定义文件中的SchemaVersion值,它应该是“schemaVersion =”2015-04.2.6“(这个对我来说还可以)

  2. 以XML格式打开服务定义文件,右键单击它,属性 - >架构。在窗口中(参见图片),只保留ServiceDefinitionSchema26.xsd(“使用此模式”),将所有其他版本设置为自动(未选中)。重新启动Visual Studio并且警告消失了。

  3. enter image description here