An open API service indexing awesome lists of open source software.

https://github.com/nikvoronin/autoversionprebuild

Auto incremental version number in a date format like v19.12.03.1643.
https://github.com/nikvoronin/autoversionprebuild

csharp dotnet powershell-script pre-build version-control versions visual-studio

Last synced: 7 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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](https://github.com/nikvoronin/AutoVersionPreBuild/blob/master/src/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"
```