mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-24 11:36:30 +00:00
fix(build): add netstandard2.0 target to eliminate System.Runtime version mismatch
The net9.0 DLL references System.Runtime 9.0.0.0 which is unavailable on GitHub runners where pwsh ships with .NET 8.x. Adding netstandard2.0 as a target produces a DLL compatible with any .NET version (PS 5.1 on .NET Framework through PS 7.x on .NET 8/9). - Add netstandard2.0 to TargetFrameworks in Core and module csproj - Update #if NET48 conditionals to include NETSTANDARD2_0 - Switch CI workflows from net9.0 to netstandard2.0 for Pester tests - Update _TestHelper.ps1 framework search order Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,10 +30,10 @@ $repoRoot = Resolve-Path (Join-Path $PSScriptRoot '../..')
|
||||
$moduleRoot = Join-Path $repoRoot 'src/PSProxmoxVE'
|
||||
|
||||
if ($PSVersionTable.PSEdition -eq 'Core') {
|
||||
$frameworks = @('net9.0', 'net48')
|
||||
$frameworks = @('netstandard2.0', 'net9.0', 'net48')
|
||||
}
|
||||
else {
|
||||
$frameworks = @('net48', 'net9.0')
|
||||
$frameworks = @('net48', 'netstandard2.0', 'net9.0')
|
||||
}
|
||||
|
||||
$searchPaths = foreach ($fw in $frameworks) {
|
||||
|
||||
Reference in New Issue
Block a user