Why is Visual Studio complaining about the configuration of the web.config trace listeners?

In my web.config, I have the following settings:

<system.diagnostics>
  <trace>
    <listeners>
       <add name="AzureDiagnostics"
          type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <filter type="" />
       </add>
    </listeners>
  </trace>
</system.diagnostics>

which is the same as in the MSDN example here :

<system.diagnostics>
  <trace>
     <listeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, 
           Microsoft.WindowsAzure.Diagnostics, 
           Version=1.0.0.0, 
           Culture=neutral, 
           PublicKeyToken=31bf3856ad364e35"
           name="AzureDiagnostics">
          <filter type="" />
       </add>
    </listeners>
 </trace>

However, Visual Studio will underline the attribute typeinside <filter type="", and when I move the mouse there, it says the 'type' attribute is not allowed. If I try to use the IntelliSense, to find what is allowed, it offers lockItem, lockElements, lockAttributes, lockAllElementsExceptand lockAllAttributesExcept.

Why doesn't Visual Studio like typeinside filter?

+5
source share
1 answer

Visual Studio XML . , . , / , . Windows Azure.

app.config/web.config , Schemas. , , . - DotNetConfig.xsd( C:\Program Files (x86)\Microsoft Visual Studio 11.0\xml\Schemas\1033\DotNetConfig.xsd, VS 2012). XSD, , (configuration/system.diagnostics/trace/listeners/ListenerElement/filter), , . , (configuration/system.diagnostics/sharedListeners/ListenerElement/filter), .

, VS, . , , VS , , type , , . .

<system.diagnostics>
      <sharedListeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="AzureDiagnostics">
          <filter type="" />
        </add>

      </sharedListeners>
        <trace>
            <listeners>
              <add name="AzureDiagnostics" />
            </listeners>
        </trace>
    </system.diagnostics>
+8

All Articles