Rod
Rod

Reputation: 15457

How do I pass assembly version from build step to next step

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?

Upvotes: 0

Views: 2312

Answers (1)

Krzysztof Madej
Krzysztof Madej

Reputation: 40603

  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"

Upvotes: 1

Related Questions