0

I have a simple windows application in my Azure DevOps repo. I'm trying to set a build for it so I can practice using the Azure Pipelines.

How would I pass the assembly version of the c# windows application which resides in the AssemblyInfo.cs file under the project properties to use in a next step of the pipeline?

Rod
  • 14,529
  • 31
  • 118
  • 230
  • Why do you need to pass the assembly version on to the next step of the pipeline? I suspect this is an XY Problem, but more context should clear it up. – mason Apr 03 '20 at 17:10

1 Answers1

1
  1. First you need get assembly version. You can use powershell script to read that value from file. This post may help you with that
  2. You need set variable to keep you assembly version. It also can be done in powershell script. You can read about this here

    Write-Host "##vso[task.setvariable variable=AssemblyVersion;]$assemblyVersionFromFile"

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107