We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bd7e48 commit dfb69a8Copy full SHA for dfb69a8
1 file changed
azure-pipelines.yml
@@ -42,11 +42,12 @@ steps:
42
inputs:
43
targetType: 'inline'
44
script: |
45
- $assemblyPath = Join-Path -Path $(Build.SourcesDirectory) -ChildPath "AccUnit\bin\Release\AccUnit.dll"
46
- $assembly = [System.Reflection.Assembly]::LoadFile($assemblyPath)
47
- $version = $assembly.GetName().Version.ToString()
+ $assemblyPath = "$(Build.SourcesDirectory)\source\AccUnit\bin\Release\AccUnit.dll"
+ $versionInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($assemblyPath)
+ $version = $versionInfo.FileVersion
48
$parts = $version.Split('.')
49
$version = "$($parts[0]).$($parts[1]).$($parts[2])"
50
+ Write-Host "Version: $version"
51
Write-Host "##vso[task.setvariable variable=dllVersion]$version"
52
53
- task: PublishBuildArtifacts@1
0 commit comments