I have the following task in an MSBuild script:
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="$(PackageDir)\temp\OddEnds.Testing\OddEnds.Testing.nuspec" XPath="/package/metadata/version" Value="%(OddEndsTestingAsmInfo.Version)" />
which should update the empty version node in the NuGet specification file with the assembly version. My .nuspec file looks like this:
<?xml version="1.0" encoding="utf-8"?> <package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:www.w3.org/2001/XMLSchema-instance"> <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <id>OddEnds</id> <authors>Tomas Lycken</authors> <version></version> <owners>Tomas Lycken</owners> <description>Odd ends and bits that I might need in any project.</description> </metadata> </package>
I believe that the XPath /package/metadata/version pointer points to the right node (because if I changed it to something else, it complains that it will not find the node), but the output says 0 node(s) selected for update.
What am I missing?
source share