tag does not exist in xml namespace

Topics: Exception Handling Application Block, Logging Application Block
May 27, 2011 at 1:04 PM

Hi,

My configuration.xaml file in my silverlight application project is failing to build yet intellisense does recognise the tags when I hover over them and I have added the references to the project.  Can you please let me know what the problem might be.

Thanks.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The tag 'ExceptionHandlingSettings' does not exist in XML namespace 'clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Silverlight'. 

The tag 'ExceptionPolicyData' does not exist in XML namespace 'clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Silverlight'.   

The tag 'ExceptionTypeData' does not exist in XML namespace 'clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Silverlight'.   

The tag 'LoggingExceptionHandlerData' does not exist in XML namespace 'clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Silverlight'.   

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:el="clr-namespace:Microsoft.Practices.EnterpriseLibrary.Logging.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.Logging.Silverlight"
    xmlns:ehl="clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Silverlight"       
    xmlns:eh="clr-namespace:Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration;assembly=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Silverlight">
  <el:LoggingSettings DefaultCategory="General" x:Key="loggingConfiguration">
    <el:LoggingSettings.TraceListeners>
      <el:RemoteServiceTraceListenerData LoggingServiceFactory="CustomBinding_ILoggingService" SubmitInterval="00:01:00" Name="Remote Service Trace Listener" />
    </el:LoggingSettings.TraceListeners>
    <el:LoggingSettings.TraceSources>
      <el:TraceSourceData Name="General">
        <el:TraceSourceData.TraceListeners>
          <el:TraceListenerReferenceData Name="Remote Service Trace Listener" />
        </el:TraceSourceData.TraceListeners>
      </el:TraceSourceData>
    </el:LoggingSettings.TraceSources>
    <el:LoggingSettings.SpecialTraceSources>
      <el:SpecialTraceSourcesData>
        <el:SpecialTraceSourcesData.AllEventsTraceSource>
          <el:TraceSourceData Name="All Events">
            <el:TraceSourceData.TraceListeners>
              <el:TraceListenerReferenceData Name="Remote Service Trace Listener" />
            </el:TraceSourceData.TraceListeners>
          </el:TraceSourceData>
        </el:SpecialTraceSourcesData.AllEventsTraceSource>
        <el:SpecialTraceSourcesData.NotProcessedTraceSource>
          <el:TraceSourceData Name="Unprocessed Category" />
        </el:SpecialTraceSourcesData.NotProcessedTraceSource>
        <el:SpecialTraceSourcesData.ErrorsTraceSource>
          <el:TraceSourceData Name="Logging Errors &amp; Warnings">
            <el:TraceSourceData.TraceListeners>
              <el:TraceListenerReferenceData Name="Remote Service Trace Listener" />
            </el:TraceSourceData.TraceListeners>
          </el:TraceSourceData>
        </el:SpecialTraceSourcesData.ErrorsTraceSource>
      </el:SpecialTraceSourcesData>
    </el:LoggingSettings.SpecialTraceSources>
  </el:LoggingSettings>
  <eh:ExceptionHandlingSettings x:Key="exceptionHandling">
    <eh:ExceptionHandlingSettings.ExceptionPolicies>
      <eh:ExceptionPolicyData Name="Policy">
        <eh:ExceptionPolicyData.ExceptionTypes>
          <eh:ExceptionTypeData
              Name="All Exceptions"
              TypeName="System.Exception, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
            <eh:ExceptionTypeData.ExceptionHandlers>
              <ehl:LoggingExceptionHandlerData
                  LogCategory="General"
                  FormatterTypeName="TextExceptionFormatter"
                  Name="Logging Exception Handler" />
            </eh:ExceptionTypeData.ExceptionHandlers>
          </eh:ExceptionTypeData>
        </eh:ExceptionPolicyData.ExceptionTypes>
      </eh:ExceptionPolicyData>
    </eh:ExceptionHandlingSettings.ExceptionPolicies>
  </eh:ExceptionHandlingSettings>
</ResourceDictionary>

May 30, 2011 at 10:14 AM

Hi,

I'm not really sure what you may be missing here. I've already tried to reproduce your scenario a couple of times but never had a chance to reproduce it until now. Out of curiosity, does the SilverlightLoggingDemo found here http://entlib.codeplex.com/releases/view/63549 also has the same design error you're having when you try using them?

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com