Skip to content

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

License

Notifications You must be signed in to change notification settings

nikvoronin/AutoVersionPreBuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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"

Releases

No releases published

Packages

No packages published