在我的 web.config 中,我有以下设置:
<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>
这与此处的 MSDN 示例相同:
<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>
然而,Visual Studio 会type在里面的属性下划线<filter type="",当我将鼠标移到那里时,它会显示the 'type' attribute is not allowed. 如果我尝试使用 IntelliSense 来查找它所允许的内容lockItem,lockElements、lockAttributes、lockAllElementsExcept和lockAllAttributesExcept.
为什么 Visual Studio 不喜欢type里面filter?