Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed the assembly version to only retain the major.minor numbers, …

…so we don't have to use binding redirects after every build
  • Loading branch information...
commit f21d8af6f85c2909284114b8978a6274dd62f807 1 parent f0903ae
Jonathan Matheus kblooie authored
Showing with 16 additions and 2 deletions.
  1. +16 −2 build/default.ps1
18 build/default.ps1
View
@@ -26,11 +26,25 @@ task default -depends Build
task Build -depends Clean, UpdateVersion, Compile, Test
task UpdateVersion {
+
+ $vSplit = $version.Split('.')
+
+ if($vSplit.Length -ne 4)
+ {
+ throw "Version number is invalid. Must be in the form of 0.0.0.0"
+ }
+
+ $major = $vSplit[0]
+ $minor = $vSplit[1]
+
+ $assemblyFileVersion = $version
+ $assemblyVersion = "$major.$minor.0.0"
+
$versionAssemblyInfoFile = "$src_directory/proj/VersionAssemblyInfo.cs"
"using System.Reflection;" > $versionAssemblyInfoFile
"" >> $versionAssemblyInfoFile
- "[assembly: AssemblyVersion(""$version"")]" >> $versionAssemblyInfoFile
- "[assembly: AssemblyFileVersion(""$version"")]" >> $versionAssemblyInfoFile
+ "[assembly: AssemblyVersion(""$assemblyVersion"")]" >> $versionAssemblyInfoFile
+ "[assembly: AssemblyFileVersion(""$assemblyFileVersion"")]" >> $versionAssemblyInfoFile
}
task Compile {
Please sign in to comment.
Something went wrong with that request. Please try again.