mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use net8.0
This commit is contained in:
@@ -136,13 +136,13 @@ jobs:
|
||||
Start-PSBuild -Clean -Runtime linux-x64 -Configuration Release
|
||||
|
||||
$sharedModules | Foreach-Object {
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net9.0\refint\$_.dll"
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net8.0\refint\$_.dll"
|
||||
Write-Verbose -Verbose "RefAssembly: $refFile"
|
||||
Copy-Item -Path $refFile -Destination "$refAssemblyFolder\$_.dll" -Verbose
|
||||
$refDoc = "$(PowerShellRoot)\src\$_\bin\Release\net9.0\$_.xml"
|
||||
$refDoc = "$(PowerShellRoot)\src\$_\bin\Release\net8.0\$_.xml"
|
||||
if (-not (Test-Path $refDoc)) {
|
||||
Write-Warning "$refDoc not found"
|
||||
Get-ChildItem -Path "$(PowerShellRoot)\src\$_\bin\Release\net9.0\" | Out-String | Write-Verbose -Verbose
|
||||
Get-ChildItem -Path "$(PowerShellRoot)\src\$_\bin\Release\net8.0\" | Out-String | Write-Verbose -Verbose
|
||||
}
|
||||
else {
|
||||
Copy-Item -Path $refDoc -Destination "$refAssemblyFolder\$_.xml" -Verbose
|
||||
@@ -152,13 +152,13 @@ jobs:
|
||||
Start-PSBuild -Clean -Runtime win7-x64 -Configuration Release
|
||||
|
||||
$winOnlyModules | Foreach-Object {
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net9.0\refint\*.dll"
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net8.0\refint\*.dll"
|
||||
Write-Verbose -Verbose 'RefAssembly: $refFile'
|
||||
Copy-Item -Path $refFile -Destination "$refAssemblyFolder\$_.dll" -Verbose
|
||||
$refDoc = "$(PowerShellRoot)\src\$_\bin\Release\net9.0\$_.xml"
|
||||
$refDoc = "$(PowerShellRoot)\src\$_\bin\Release\net8.0\$_.xml"
|
||||
if (-not (Test-Path $refDoc)) {
|
||||
Write-Warning "$refDoc not found"
|
||||
Get-ChildItem -Path "$(PowerShellRoot)\src\$_\bin\Release\net9.0" | Out-String | Write-Verbose -Verbose
|
||||
Get-ChildItem -Path "$(PowerShellRoot)\src\$_\bin\Release\net8.0" | Out-String | Write-Verbose -Verbose
|
||||
}
|
||||
else {
|
||||
Copy-Item -Path $refDoc -Destination "$refAssemblyFolder\$_.xml" -Verbose
|
||||
|
||||
@@ -269,7 +269,7 @@ jobs:
|
||||
)
|
||||
|
||||
$sourceModulePath = Join-Path '$(GlobalToolArtifactPath)' 'publish' 'PowerShell.Windows.x64' 'release' 'Modules'
|
||||
$destModulesPath = Join-Path "$outputPath" 'temp' 'tools' 'net9.0' 'any' 'modules'
|
||||
$destModulesPath = Join-Path "$outputPath" 'temp' 'tools' 'net8.0' 'any' 'modules'
|
||||
|
||||
$modulesToCopy | ForEach-Object {
|
||||
$modulePath = Join-Path $sourceModulePath $_
|
||||
@@ -277,7 +277,7 @@ jobs:
|
||||
}
|
||||
|
||||
# Copy ref assemblies
|
||||
Copy-Item '$(Pipeline.Workspace)/Symbols_$(Architecture)/ref' "$outputPath\temp\tools\net9.0\any\ref" -Recurse -Force
|
||||
Copy-Item '$(Pipeline.Workspace)/Symbols_$(Architecture)/ref' "$outputPath\temp\tools\net8.0\any\ref" -Recurse -Force
|
||||
|
||||
$contentPath = Join-Path "$outputPath\temp" 'content'
|
||||
$contentFilesPath = Join-Path "$outputPath\temp" 'contentFiles'
|
||||
@@ -285,7 +285,7 @@ jobs:
|
||||
Remove-Item -Path $contentPath,$contentFilesPath -Recurse -Force
|
||||
|
||||
# remove PDBs to reduce the size of the nupkg
|
||||
Remove-Item -Path "$outputPath\temp\tools\net9.0\any\*.pdb" -Recurse -Force
|
||||
Remove-Item -Path "$outputPath\temp\tools\net8.0\any\*.pdb" -Recurse -Force
|
||||
|
||||
Compress-Archive -Path "$outputPath\temp\*" -DestinationPath "$outputPath\$nupkgName" -Force
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
|
||||
Reference in New Issue
Block a user