File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,12 @@ function PatchNupkgs {
9999 # Copy the nupkg from nuget artifacts nupkg folder, to the temp folder, and extracted it
100100 $nupkg = Get-ChildItem - Path " $nupkgsPath " - Exclude " *.symbols.nupkg" | Where-Object {$_.Name -like " $nupkgId$suffix *" }
101101
102+ if (-not $nupkg -Or -not (Test-Path $nupkg ))
103+ {
104+ Write-Error " $nupkgId$suffix not found in $nupkgsPath "
105+ return $false
106+ }
107+
102108 Copy-Item $nupkg - Destination $tempExtractFolder
103109
104110 $nupkgTemp = [System.IO.Path ]::Combine($tempExtractFolder , $nupkg.Name )
@@ -326,7 +332,6 @@ function Patch
326332 " NuGet.Protocol" ,
327333 " NuGet.ProjectModel" ,
328334 " NuGet.Packaging" ,
329- " NuGet.Packaging.Core" ,
330335 " NuGet.LibraryModel" ,
331336 " NuGet.Frameworks" ,
332337 " NuGet.DependencyResolver.Core" ,
@@ -336,6 +341,12 @@ function Patch
336341 " NuGet.CommandLine.XPlat" ,
337342 " NuGet.Credentials" )
338343
344+ if (([int ]($SDKVersion.Substring (0 , 1 )) -le 8 ) )
345+ {
346+ Write-Host " Adding nuget.packaging.core"
347+ $copiedNupkgIds += " NuGet.Packaging.Core"
348+ }
349+
339350 $packNupkg = Get-ChildItem - Path " $nupkgsPath " - Exclude ' *.symbols.nupkg' | Where-Object {$_.Name -like " NuGet.Build.Tasks.Pack*" }
340351 $suffix = $packNupkg.Name -replace " NuGet.Build.Tasks.Pack" , " "
341352
You can’t perform that action at this time.
0 commit comments