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.
- Host: GitHub
- URL: https://github.com/nikvoronin/autoversionprebuild
- Owner: nikvoronin
- License: mit
- Created: 2019-01-28T19:14:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-15T09:27:53.000Z (about 6 years ago)
- Last Synced: 2025-01-16T11:27:06.178Z (9 months ago)
- Topics: csharp, dotnet, powershell-script, pre-build, version-control, versions, visual-studio
- Language: PowerShell
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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"
```