/AutoVersionPreBuild

Auto incremental version number in a date format like v19.12.03.1643.

Primary LanguagePowerShellMIT LicenseMIT

Version Number As A Build Date

Or a build date as a version number. Auto incremental version in a date format like: Version 19.12.03.1643. The script itself changes version attribute only.

Drop pre-build.ps1 next to .sln file then add at the
Visual Studio -> Project Settings -> Build Events -> Pre-build event command line

next line

powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "$(SolutionDir)pre-build.ps1" -ProjectDir "$(ProjectDir)\"

Do not remove last slash \"

Optional Parameters

-PropertiesDir "Properties"

-AsmInfoFilename "AssemblyInfo.cs"

Example

powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "$(SolutionDir)pre-build.ps1" -ProjectDir "$(ProjectDir)\" -PropertiesDir "Properties" -AsmInfoFilename "AssemblyInfo.cs"