I found a fairly neat way to retrieve version details from an AssemblyInfo.cs file without having to go down the script task route, here’s the nant xml:
This will put the version segments into the named properties.
Some info I picked up while using the regex task which I couldn’t find documentation about:
- When having to match on double quote character ” you must use the ascii code \x22
- The names of the groups in the regex can’t contain periods, at first i had the groups named version.major, version.minor etc…