Skip to content

Commit dfb69a8

Browse files
committed
Update azure-pipelines.yml for Azure Pipelines
1 parent 8bd7e48 commit dfb69a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ steps:
4242
inputs:
4343
targetType: 'inline'
4444
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()
45+
$assemblyPath = "$(Build.SourcesDirectory)\source\AccUnit\bin\Release\AccUnit.dll"
46+
$versionInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($assemblyPath)
47+
$version = $versionInfo.FileVersion
4848
$parts = $version.Split('.')
4949
$version = "$($parts[0]).$($parts[1]).$($parts[2])"
50+
Write-Host "Version: $version"
5051
Write-Host "##vso[task.setvariable variable=dllVersion]$version"
5152
5253
- task: PublishBuildArtifacts@1

0 commit comments

Comments
 (0)