### Install NetRevisionTask NuGet Package Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md Declare the NetRevisionTask package reference as private in your .csproj file to ensure it's not included in the final package. ```xml ``` -------------------------------- ### MSBuild Properties for Versioning Configuration Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md Configure versioning behavior by setting these properties within your project file. This example shows common settings for revision format, attribute resolution, and tag matching. ```xml {semvertag} true true true v[0-9]* true git true $(MSBuildProjectDirectory) ``` -------------------------------- ### Git Version Format Excluding Master Branch Name Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md An example of customizing the Git version format to exclude the branch name for the 'master' branch. ```text {semvertag:master:+chash}{!:-mod} ``` -------------------------------- ### PowerShell API Call Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md Call the GetVersion API from NetRevisionTask using PowerShell. Ensure NetRevisionTask.dll is accessible. ```powershell Add-Type -Path NetRevisionTask.dll [NetRevisionTask.Api]::GetVersion() ``` -------------------------------- ### Assembly Version Attributes in C# Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md Define assembly version and informational version using NetRevisionTask's format specifiers in AssemblyInfo.cs. This is the recommended method for classic C# projects. ```csharp [assembly: AssemblyVersion("0.0")] [assembly: AssemblyInformationalVersion("1.{c:15m:2013}-{chash:6}-{c:ymd}")] ``` -------------------------------- ### Git Default Version Format Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md This is the default production-ready format for Git revisions, including semantic version tags, commit hash, and modification status. ```text {semvertag+chash}{!:-mod} ``` -------------------------------- ### Batch Script API Call Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md Execute the GetVersion API from NetRevisionTask using a batch script. This invokes PowerShell to run the command. ```batch @echo off %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Add-Type -Path NetRevisionTask.dll; [NetRevisionTask.Api]::GetVersion()" exit /b %errorlevel% ``` -------------------------------- ### Subversion Default Version Format Source: https://github.com/ygoe/netrevisiontask/blob/master/README.md The default format for Subversion revisions, using the revision number as the patch number. It's recommended to change this before making a release. ```text 0.0.{revnum}{!:-mod} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.