Vpatch
Versioning helper command line utility
Install / Use
/learn @nefarius/VpatchREADME
<img src="assets/favicon_128x128.png" align="left" />vpatch
Versioning helper command line utility.
About
This command line tool can version-stamp the following project files and types:
- Legacy .NET Framework
.csprojandAssemblyInfo.csfiles - Current (SDK-format) .NET Core
.csprojfiles - C/C++ Win32 VERSIONINFO resource files
- Stamping INF version info in driver projects
It is most useful in Continuous Integration setups to avoid having to deal with custom scripts to bump the version number with each build or release.
Installation
dotnet tool install --global Nefarius.Tools.Vpatch
Usage examples
Stamp *.rc files
Read version string from file version.txt and replace both File Version and Product Version attributes in resource
file ExampleProject.rc:
vpatch --stamp-version-from-file version.txt --target-file "%solution%\ExampleProject\ExampleProject.rc" --resource.file-version --resource.product-version
Stamp with version from AppVeyor:
vpatch --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file "%solution%\ExampleProject\ExampleProject.rc" --resource.file-version --resource.product-version
Stamp .NET Framework AssemblyInfo
Read version string from file version.txt and replace both AssemblyVersion and AssemblyFileVersion attributes in
AssemblyInfo.cs:
vpatch --stamp-version-from-file version.txt --target-file "%solution%\ExampleProject\Properties\AssemblyInfo.cs" --assembly.version --assembly.file-version
Stamp Windows Driver Project
Read version string from file version.txt and replace TimeStamp attribute in ExampleProject.vcxproj:
vpatch --stamp-version-from-file version.txt --target-file "%solution%\ExampleProject\ExampleProject.vcxproj" --vcxproj.inf-time-stamp
Stamp with version from AppVeyor:
vpatch --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file "%solution%\ExampleProject\ExampleProject.vcxproj" --vcxproj.inf-time-stamp
appveyor.yml example
Updates relevant version sections within a Windows Driver Project run on AppVeyor CI:
before_build:
- cmd: dotnet tool install --global Nefarius.Tools.Vpatch
- cmd: vpatch --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file ".\sys\%APPVEYOR_PROJECT_NAME%.vcxproj" --vcxproj.inf-time-stamp
- cmd: vpatch --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file ".\sys\%APPVEYOR_PROJECT_NAME%.rc" --resource.file-version --resource.product-version
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
