Use net8.0

This commit is contained in:
Aditya Patwardhan
2024-06-12 16:21:12 -07:00
parent 2350ae06d9
commit 0fdcd2856f
3 changed files with 10 additions and 10 deletions
+6 -6
View File
@@ -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>