Powershell script to batch-update AssemblyInfo.cs with new Version
Posted by: All About Interop,
on 21 Apr 2008 |
View original | Bookmarked: 0 time(s)
Maybe someone can learn from this.
# SetVersion.ps1
#
# Set the version in All the AssemblyInfo.cs files in any subdirectory.
#
# last saved Time-stamp: <Saturday, April 19, 2008 14:16:01 (by dinoch)>
#
function Update-SourceVersion
{
Param ([string]$Version)
$NewVersion = 'AssemblyVersion("' + $Version + '")';
$NewFileVersion = 'AssemblyFileVersion("' + $Version + '")';
foreach ($o in $input)
{
$NewFile = [System.IO.Path]::Combine($o.DirectoryName, "AssemblyInfo.cs");...