diff --git a/build.psm1 b/build.psm1 index 7004c0af4e..9a20e90bd5 100644 --- a/build.psm1 +++ b/build.psm1 @@ -893,6 +893,10 @@ function New-PSOptions { # So we, will change the RID to win7- $Runtime = $RID -replace "win\d+", "win7" + if ($Runtime -like 'win-*') { + $Runtime = $Runtime -replace 'win-', 'win7-' + } + Write-Verbose -Verbose "Setting runtime to '$Runtime'" } diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 4587a84d85..d46e5029a0 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -801,11 +801,11 @@ function Update-PSSignedBuildFolder # Agents seems to be on a case sensitive file system if ($IsLinux) { - $relativePath = $signedFileObject.Replace($SignedFilesPathNormalized, '') + $relativePath = $signedFilePath.Replace($SignedFilesPathNormalized, '') } else { Write-Verbose -Verbose "Normalizing path" - Write-Verbose -Verbose "signedFileObject = $signedFileObject" - $relativePath = $signedFileObject.ToLowerInvariant().Replace($SignedFilesPathNormalized.ToLowerInvariant(), '') + Write-Verbose -Verbose "signedFileObject = $signedFilePath" + $relativePath = $signedFilePath.ToLowerInvariant().Replace($SignedFilesPathNormalized.ToLowerInvariant(), '') } Write-Verbose -Verbose "relativePath = $relativePath"