定義行爲擴展元素wsdlExtensions
的模式。
<xs:complexType name="wsdlExtensions">
<xs:attribute name="singleFile" type="boolean_Type" use="optional" default="True" />
</xs:complexType>
包括用於智能感知新元素的架構文件架構
Visual Studio中通常採用%VS_INSTALL_DIR%\xml\Schemas\DotNetConfig.xsd
文件智能感知,除非在Visual Studio配置爲使用其他一些文件。
要檢查哪些文件用於Intellisense,請在配置文件處於打開狀態時選擇XML-> Schemas。 Intellisense中使用Use
列中有勾號的所有文件。
<?xml version="1.0" encoding="us-ascii"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
elementFormDefault="qualified" attributeFormDefault="unqualified"
vs:helpNamespace="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!-- Child elements omitted for brevity -->
</xs:schema>
在架構文件
爲wsdlExtensions
行爲擴展元素的適當水平是 system.serviceModel/C/behaviors/C/endpointBehaviors/C/behavior/C
其中C
是complexType/choice
元素在適當級別上定義新的元素。
<?xml version="1.0" encoding="us-ascii"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
elementFormDefault="qualified" attributeFormDefault="unqualified"
vs:helpNamespace="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!-- Omitted elements at various levels for brevity -->
<xs:element name="system.serviceModel" vs:help="configuration/system.serviceModel">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="behaviors" vs:help="configuration/system.serviceModel/behaviors">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="endpointBehaviors" vs:help="configuration/system.serviceModel/behaviors/endpointBehaviors">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="behavior" vs:help="configuration/system.serviceModel/behaviors/endpointBehaviors/behavior">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="wsdlExtensions" type="wsdlExtensions" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
我想這是一個錯誤發生在Visual Studio中,而不是在運行時。正確? – 2011-04-06 08:29:50
@Rest Wing,其實這只是一個提示/警告。該項目仍在建設和運行。 – Sam 2011-04-06 23:12:02