https://github.com/GitTools/GitVersion/issues/1153git
I'm using GitVersion in an internal ClickOnce application. It's quite easy to setup. I've added following target in my .csproj file:github
<Target Name="MyApp_SetClickOnceVersion" AfterTargets="UpdateAssemblyInfo" DependsOnTargets="GetVersion" BeforeTargets="_DeploymentComputeClickOnceManifestInfo"> <CreateProperty Value="$(GitVersion_AssemblySemVer)"> <Output TaskParameter="Value" PropertyName="ApplicationVersion" /> </CreateProperty> <!-- for VSTO --> <CreateProperty Value="$(ApplicationVersion)"> <Output TaskParameter="Value" PropertyName="PublishVersion" /> </CreateProperty> <Message Text="ApplicationVersion: $(ApplicationVersion)" Importance="High" /> </Target>
This will set the properties ApplicationVersion
and PublishVersion
dynamically to the correct value.app