Two questions:
1. What is the significance of LogMessageEvent? Is that the way to return data to MSBuild? A little explanation (or link) might help there.
2. Is it necessary to declare the „host“ property? Maybe I’m going blind, but I can’t see where it is used. 😉
Indeed Marcin,
Best thing is to use the AssemblyInformationalVersion attribute, as it doesn’t restrict you to 4 shorts (UInt16).
At the same time, when you stamp your assembly with it, it also allows you to retrieve the AssemblyInformationalVersion attribute using reflection.
An other common alternative is to use div and mod 10,000 respectively for the 3rd and 4th part of the version number.
9 Kommentare
David White
Two questions:
1. What is the significance of LogMessageEvent? Is that the way to return data to MSBuild? A little explanation (or link) might help there.
2. Is it necessary to declare the „host“ property? Maybe I’m going blind, but I can’t see where it is used. 😉
Nick
Heya mate, think you need to escape the periods in your regex, otherwise they’ll match anything:
(d+)\.(d+)\.(d+)\.(d+)
AlexM
Your blog is interesting!
Keep up the good work!
Pingback:
Pingback:
Wim Hollebrandse
Hmm. And what happens when your SVN revision number for your repository hits 65535?
Well, your AssemblyInfo won’t compile anymore, that’s what.
Marcin Kawalerowicz
@Wim Hollebrandse: Good point. Thanks! Learned this the hard way? 😉
Wim Hollebrandse
Indeed Marcin,
Best thing is to use the AssemblyInformationalVersion attribute, as it doesn’t restrict you to 4 shorts (UInt16).
At the same time, when you stamp your assembly with it, it also allows you to retrieve the AssemblyInformationalVersion attribute using reflection.
An other common alternative is to use div and mod 10,000 respectively for the 3rd and 4th part of the version number.
Pingback: