<endpointBehaviors>
<behavior name="singleFileEndpointBehavior">
<wsdlExtensions singleFile="True" />
</behavior>
</endpointBehaviors>
Run Code Online (Sandbox Code Playgroud)
"wsdlExtensions"下方有一条蓝线表示错误.
The element 'behavior' has invalid child element 'wsdlExtensions' ...
有谁知道如何解决这一问题?
定义行为扩展元素的模式wsdlExtensions.
<xs:complexType name="wsdlExtensions">
<xs:attribute name="singleFile" type="boolean_Type" use="optional" default="True" />
</xs:complexType>
Run Code Online (Sandbox Code Playgroud)
在用于Intellisense的模式文件中包含新元素的模式
Visual Studio通常将%VS_INSTALL_DIR%\xml\Schemas\DotNetConfig.xsd文件用于Intellisense,除非Visual Studio配置为使用其他文件.
要检查哪些文件用于Intellisense,请在配置文件打开时选择XML-> Schemas.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>
Run Code Online (Sandbox Code Playgroud)
在模式文件中的适当级别定义新元素
在适当的级别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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3711 次 |
| 最近记录: |