Skip to content

Instantly share code, notes, and snippets.

View sherpc's full-sized avatar

Alexander Sher sherpc

View GitHub Profile
@bradjolicoeur
bradjolicoeur / gist:e77c508089aea6614af3
Created August 8, 2014 20:15
Powershell Script to Increment Build Number in AssemblyInfo.cs
#
# This script will increment the build number in an AssemblyInfo.cs file
#
$assemblyInfoPath = "C:\Data\Temp\AssemblyInfo.cs"
$contents = [System.IO.File]::ReadAllText($assemblyInfoPath)
$versionString = [RegEx]::Match($contents,"(AssemblyFileVersion\("")(?:\d+\.\d+\.\d+\.\d+)(""\))")
Write-Host ("AssemblyFileVersion: " +$versionString)