RWServer’s TechBlog

Ideas and Comments about how to get things done

August 17, 2007

Example of namespace usage with nant’s

by @ 3:34 pm. Filed under Windows


After several hours figuring out why my would not find the xpath to change a setting in an enterprise library’s based app.config I came accross this post from Soledad Pano who saved the day.

Here is the relevant part of my app.config:

<configuration xmlns=”http://schemas.microsoft.com/.NetConfiguration/v2.0″>
  <exceptionHandling>
    <exceptionPolicies>
      <add name=”FileLog”>
        <exceptionTypes>
          <add type=”System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″
            postHandlingAction=”NotifyRethrow” name=”Exception”>
            <exceptionHandlers>
              <add logCategory=”General” eventId=”100″ severity=”Error” title=”DynMRO Exception”
                formatterType=”Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
                priority=”0″ type=”Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
                name=”Logging Handler” />
            </exceptionHandlers>
          </add>
        </exceptionTypes>
      </add>
    </exceptionPolicies>
  </exceptionHandling>
</configuration>

and the xmlpoke looks like:

      <xmlpoke
        file=”bin\${ass.name}.dll.config”
        xpath=”/xi:configuration/xi:exceptionHandling/xi:exceptionPolicies/xi:add[@name=’FileLog’]/xi:exceptionTypes/xi:add[@type = ‘System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′]/@postHandlingAction”
        value=”None” failonerror=”true”>
        <namespaces>
            <namespace prefix=”xi” uri=”http://schemas.microsoft.com/.NetConfiguration/v2.0″ />
        </namespaces>
      </xmlpoke>

Sos grande Soledad!

search blog:

categories:

archives:

August 2007
M T W T F S S
« Jul   Jan »
 12345
6789101112
13141516171819
20212223242526
2728293031  

other:

Get Firefox!

general links:

internal links:

21 queries. 0.153 seconds