From 428b56d9e332af5ee6a6d89723eae684c48331b3 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Wed, 6 Nov 2024 09:14:11 -0800 Subject: [PATCH 1/2] switch to net48 --- pode.build.ps1 | 8 ++++---- src/Listener/Pode.csproj | 8 +++++++- src/Pode.psm1 | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pode.build.ps1 b/pode.build.ps1 index d82731d5c..d53211af1 100644 --- a/pode.build.ps1 +++ b/pode.build.ps1 @@ -113,9 +113,9 @@ function Invoke-PodeBuildDotnetBuild($target) { # Determine if the target framework is compatible $isCompatible = $False switch ($majorVersion) { - 8 { if ($target -in @('net6.0', 'netstandard2.0', 'net8.0')) { $isCompatible = $True } } - 7 { if ($target -in @('net6.0', 'netstandard2.0')) { $isCompatible = $True } } - 6 { if ($target -in @('net6.0', 'netstandard2.0')) { $isCompatible = $True } } + 8 { if ($target -in @('net6.0', 'net48', 'net8.0')) { $isCompatible = $True } } + 7 { if ($target -in @('net6.0', 'net48')) { $isCompatible = $True } } + 6 { if ($target -in @('net6.0', 'net48')) { $isCompatible = $True } } } # Skip build if not compatible @@ -394,7 +394,7 @@ Task Build BuildDeps, { try { Push-Location ./src/Listener - Invoke-PodeBuildDotnetBuild -target 'netstandard2.0' + Invoke-PodeBuildDotnetBuild -target 'net48' Invoke-PodeBuildDotnetBuild -target 'net6.0' Invoke-PodeBuildDotnetBuild -target 'net8.0' } diff --git a/src/Listener/Pode.csproj b/src/Listener/Pode.csproj index 3932c1dc7..8bb5ed5cd 100644 --- a/src/Listener/Pode.csproj +++ b/src/Listener/Pode.csproj @@ -1,7 +1,13 @@ - netstandard2.0;net6.0;net8.0 + net48;net6.0;net8.0 $(NoWarn);SYSLIB0001 7.3 + + + + + + diff --git a/src/Pode.psm1 b/src/Pode.psm1 index 3e2d95553..57e89ab68 100644 --- a/src/Pode.psm1 +++ b/src/Pode.psm1 @@ -104,11 +104,11 @@ try { # use netstandard if no folder found if ([string]::IsNullOrWhiteSpace($netFolder)) { - $netFolder = "$($libsPath)/netstandard2.0" + $netFolder = Join-Path -Path $libsPath -ChildPath "net48" } # append Pode.dll and mount - Add-Type -LiteralPath "$($netFolder)/Pode.dll" -ErrorAction Stop + Add-Type -LiteralPath (Join-Path -Path $netFolder -ChildPath "Pode.dll") -ErrorAction Stop } # load private functions From 1ae20d76c88edae31106a90746f18dade58e4506 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Fri, 22 Nov 2024 06:22:34 -0800 Subject: [PATCH 2/2] Update pode.build.ps1 --- pode.build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/pode.build.ps1 b/pode.build.ps1 index d53211af1..06405074d 100644 --- a/pode.build.ps1 +++ b/pode.build.ps1 @@ -113,6 +113,7 @@ function Invoke-PodeBuildDotnetBuild($target) { # Determine if the target framework is compatible $isCompatible = $False switch ($majorVersion) { + 9 { if ($target -in @('net6.0', 'netstandard2.0', 'net8.0', 'net9.0')) { $isCompatible = $True } } 8 { if ($target -in @('net6.0', 'net48', 'net8.0')) { $isCompatible = $True } } 7 { if ($target -in @('net6.0', 'net48')) { $isCompatible = $True } } 6 { if ($target -in @('net6.0', 'net48')) { $isCompatible = $True } }