@@ -33,7 +33,7 @@ FormatTaskName (("-"*25) + "[{0}]" + ("-"*25))
3333
3434Task default - depends Clean , Build, Package
3535
36- Task Build - depends Restore-Packages , Update-AssemblyInfoFiles {
36+ Task Build - depends Restore-Packages {
3737 exec { . $MSBuild $SolutionFile / t:Build / v:normal / p:Configuration= $Configuration }
3838 exec { . $MSBuild $SolutionFile / t:Build / v:normal / p:Configuration= $Configuration - Net45 }
3939}
@@ -60,25 +60,3 @@ Task Install-MSBuild {
6060}
6161
6262Task Install-BuildTools - depends Install-MSBuild
63-
64- # Borrowed from Luis Rocha's Blog (http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html)
65- Task Update-AssemblyInfoFiles {
66- $assemblyVersionPattern = ' AssemblyVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
67- $fileVersionPattern = ' AssemblyFileVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
68- $fileCommitPattern = ' AssemblyInformationalVersion\("(.*?)"\)'
69-
70- $assemblyVersion = ' AssemblyVersion("' + $Version + ' ")' ;
71- $fileVersion = ' AssemblyFileVersion("' + $Version + ' ")' ;
72- $commitVersion = ' AssemblyInformationalVersion("' + $InformationalVersion + ' ")' ;
73-
74- Get-ChildItem - path $SolutionRoot - r - filter AssemblyInfo.cs | ForEach-Object {
75- $filename = $_.Directory.ToString () + ' \' + $_.Name
76- $filename + ' -> ' + $Version
77-
78- (Get-Content $filename ) | ForEach-Object {
79- % {$_ -replace $assemblyVersionPattern , $assemblyVersion } |
80- % {$_ -replace $fileVersionPattern , $fileVersion } |
81- % {$_ -replace $fileCommitPattern , $commitVersion }
82- } | Set-Content $filename
83- }
84- }
0 commit comments