Soledad Pano's Blog

Just Technical Stuff

November 2006 - Posts

Isolating Office Extensions with the COM Shim Wizard

This post was originally published at http://solepano.blogspot.com

This article explains the importance of using a shim when implementing managed extensions for Office. It also provides a wizard to easily generate the shim from the managed extension. Very recommendable.
Posted: Nov 07 2006, 05:03 PM by spano | with no comments
Filed under:
Problem with NAnt's xmlpoke task

This post was originally published at http://solepano.blogspot.com

There's an issue when trying to replace some part of an xml file that is under a default namespace using NAnt’s xmlpoke task. It happened to me the other day when trying to replace the version attribute in the following wix file:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
<Product Name="MyProduct" Id="847A8D24-0F98-4b9f-AEA0-070ABD49F86C" Language="1033" Codepage="1252" Version="1.0.0" Manufacturer="MyCompany">
......
</Product>
</Wix>

Because of the namespace definition in the Wix element, calling xmlpoke simple as
<xmlpoke file="${wix.file}" xpath="/Wix/Product/@Version" value="${build.new.version}"/>
does not work.

What it does work is the following use of the task:

<xmlpoke file="${wix.file}" xpath="/wx:Wix/wx:Product/@Version" value="${build.version}">
<namespaces>
<namespace prefix="wx" uri="http://schemas.microsoft.com/wix/2003/01/wi" />
</namespaces>
</xmlpoke>

Posted: Nov 07 2006, 03:26 PM by spano | with 1 comment(s)
Filed under:
NAnt.Contrib

This post was originally published at http://solepano.blogspot.com

NAnt Contrib is a project that contributes with a lot of additional tasks to NAnt. For example, two of the most useful tasks for me are the trycatch and choose tasks.
Posted: Nov 07 2006, 03:24 PM by spano | with no comments
Filed under:
More Posts