File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments