https://github.com/GitTools/GitVersion/issues/1153

 

 

I'm using GitVersion in an internal ClickOnce application. It's quite easy to setup. I've added following target in my .csproj file:

<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.

相关文章:

  • 2021-08-11
  • 2022-02-13
  • 2022-12-23
  • 2021-12-19
  • 2021-06-20
  • 2021-07-12
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-02-15
  • 2022-12-23
  • 2021-04-21
  • 2022-12-23
相关资源
相似解决方案