Timeline for Increment up the build number in AssemblyInfo.cs on every build
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 12, 2014 at 12:34 | vote | accept | BenVlodgi | ||
| Apr 23, 2014 at 3:48 | history | edited | grovesNL | CC BY-SA 3.0 | Changed to use Regex.Replace instead, which eliminates the need for looping |
| Apr 23, 2014 at 1:04 | comment | added | grovesNL | @svick: Nice, I like that. Feel free to edit it directly into my post if you'd like (I don't have access to a compiler right now to test). | |
| Apr 22, 2014 at 22:30 | comment | added | svick | Yeah, delegate, along with look-ahead and look-behind: string expr = @"(?<=\[assembly: AssemblyFileVersion\(""[0-9]*.[0-9]*.)[0-9]*(?=.[0-9]*""\)\])"; file[i] = Regex.Replace(file[i], expr, m => (Convert.ToInt16(m.Value) + 1).ToString());. | |
| Apr 22, 2014 at 21:33 | comment | added | grovesNL | @CodesInChaos: foreach uses an enumerator. How would you modify the value of the line in this way? | |
| Apr 22, 2014 at 20:19 | comment | added | grovesNL | @svick: I'm not sure the Regex engine is able to perform number increments like that within Regex.Replace. Maybe you can accomplish this by using a delegate. | |
| Apr 22, 2014 at 20:10 | comment | added | svick | Wouldn't this be even better by using Regex.Replace? That way, you wouldn't have to do anything with parts that don't change. | |
| Apr 22, 2014 at 19:11 | history | edited | grovesNL | CC BY-SA 3.0 | added 20 characters in body |
| Apr 22, 2014 at 19:02 | history | answered | grovesNL | CC BY-SA 3.0 |