-
Notifications
You must be signed in to change notification settings - Fork 663
Description
Using a shared assembly info I am setting my version number in a constant string
[assembly: AssemblyVersion(AssemblyInfo.Version)]
[assembly: AssemblyFileVersion(AssemblyInfo.FileVersion)]
[assembly: AssemblyInformationalVersion(AssemblyInfo.InformationalVersion)]
Looking at the RegEx to replace the attributes, this is not going to work as it requires quotation marks in the between the parentheses of the attribute.
This of course results in duplicate Assembly attributes, as it will try to append new attributes, assuming there are none.
I don't understand why the RegEx in AssemblyInfoFileUpdate.cs requires the quotation marks
RegEx:
AssemblyVersion(Attribute)?\s*\(\s*"[^""]*"\s*\)
Would it not be better to just replace any content (including whitespace) between the parentheses of the Attribute?
RegEx:
AssemblyVersion(Attribute)?\s*\(\s*\S*\s*\)
Of course, the string that's replacing the original should then have the quotation marks again.
Probably this would require some refactoring on AssemblyInfoFileUpdate.cs and maybe some other places. I'm glad to make a PR, does anyone see any issues with this?