An open source project uses CMake to build it's project files.
I don't agree with CMake - it's a 10mb installer to create batch files for a few hundred kb of source and even then it hardcodes the developers path to the output. It does not do relative paths at all, nor does it use the handy macros that Visual Studio provides.
So I decided to look around. Gyp looked promising but again it is placing a reliance on the user having Python installed and that is back to the reason why I dislike CMake. At least it doesn't hard code paths though.
So I thought about using batch files, and simple find and replace but since the project files are xml why not XSLT? So a bit of searching ran across this page here on SO which seemed to show what I want to do at a very simplistic level.
So I edited the answer by Dimitre Novatchev to the following:
<xsl:template match="OutDir/text()">
<xsl:text>Diferent text</xsl:text>
</xsl:template>
Hoping that would find the following and change it:
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">U:\unittest-cpp-pj\vs_projects\vs2012_x86\Debug\</OutDir>
However that didn't work - using the VS2010 xslt debugger it doesn't even break on the line. I don't want to spend months learning how to use XSLT correctly for something as seemingly simple as this. All I need is something that I can fire at 28 xml files and be done with it.
Once I have this working I will expand it to replace the fields with the correct values.
Update: This is the entire XSLT:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="OutDir/text()">
<xsl:text>Diferent text</xsl:text>
</xsl:template>
</xsl:stylesheet>
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"on the root element of the XML?