Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

Commented Issue: AssemblyInfo task does not parse assembly versions correctly [10310]

$
0
0
The AssemblyInfo task uses a regular expression that's written to look for a version of the form major.minor.build.revision, however it is valid for an assembly version to contain only major.minor.build or even only major.minor. This means the regex fails on the last 2 types of version, even though they are valid and the System.Version class successfully parses them. Additionally, the task cannot parse non-numeric version numbers consisting of the character * which is a valid specifier in an [AssemblyVersion] or [AssemblyFileVersion] attribute.

I've written a patch to overcome the above limitations. Versions without full version numbers will have the missing ones defaulted to zero, so major.minor will become major.minor.0.0. Versions with * as a version number (only valid in revision or build fields) will have that * replaced with 0, so major.minor.* will become major.minor.0.

Since the AssemblyInfo task has not changed between 3.5.x and 4.0.x of the Extension Pack, this patch will be applicable to both versions.

Please advise to whom I should submit this patch and in what format it should be supplied in (as a diff, etc.).
Comments: ** Comment from web user: mikeFourie **

Thanks Ian. Sorry for the delay. I'll get time to process this in around 3 weeks and expect to ship with the September release.

Mike


Viewing all articles
Browse latest Browse all 1211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>