diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 861dfc95c24..e2d06e68f9d 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -2204,10 +2204,14 @@ function New-ReferenceAssembly $sourceProjectRoot = Join-Path $PSScriptRoot "projects/reference/$assemblyName" $sourceProjectFile = Join-Path $sourceProjectRoot "$assemblyName.csproj" - Copy-Item -Path $sourceProjectFile -Destination "$projectFolder/$assemblyName.csproj" -Force - Copy-Item -Path (Join-Path -Path $PSScriptRoot -ChildPath "../../nuget.config") -Destination $projectFolder - Write-Host "##vso[artifact.upload containerfolder=artifact;artifactname=artifact]$projectFolder/$assemblyName.csproj" + $destProjectFile = Join-Path $projectFolder "$assemblyName.csproj" + $nugetConfigFile = Join-Path $PSScriptRoot "../../nuget.config" + + Copy-Item -Path $sourceProjectFile -Destination $destProjectFile -Force -Verbose + Copy-Item -Path $nugetConfigFile -Destination $projectFolder -Verbose + + Write-Host "##vso[artifact.upload containerfolder=artifact;artifactname=artifact]$destProjectFile" Write-Host "##vso[artifact.upload containerfolder=artifact;artifactname=artifact]$generatedSource" $arguments = GenerateBuildArguments -AssemblyName $assemblyName -RefAssemblyVersion $RefAssemblyVersion -SnkFilePath $SnkFilePath -SMAReferencePath $SMAReferenceAssembly diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index 4e303e17439..c6f21ec81f0 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -201,16 +201,18 @@ jobs: $packagePathList = Get-ChildItem $packagePath -Recurse | Select-Object -ExpandProperty FullName | Out-String Write-Verbose -Verbose $packagePathList - Get-ChildItem -Path $packagePath | + $checksums = Get-ChildItem -Path $packagePath | ForEach-Object { - Write-Verbose -Verbose "Generating checksum file for $($_.FullName)" - $packageName = $_.Name - $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA512).Hash.ToLower() - - # the '*' before the packagename signifies it is a binary - "$hash *$packageName" - } | - Out-File -FilePath "$packagePath\SHA512SUMS" -Force + Write-Verbose -Verbose "Generating checksum file for $($_.FullName)" + $packageName = $_.Name + $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA512).Hash.ToLower() + + # the '*' before the packagename signifies it is a binary + "$hash *$packageName" + } + + $checksums | Out-File -FilePath "$packagePath\SHA512SUMS" -Force + $fileContent = Get-Content -Path "$packagePath\SHA512SUMS" -Raw | Out-String Write-Verbose -Verbose -Message $fileContent