-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Inspired by https://devblogs.microsoft.com/powershell/announcing-powershell-7-6/
- ... general availability of PowerShell 7.6! This release is built on .NET 10 and similarly, is our latest Long Term Support (LTS) release supported for 3 years. Similar to PowerShell 7.4 and NET 8 Support #179
Problem...
However, this time it is a must as running ISHRemote v8.1, which is compiled for cross-platform .NET 6.0 (and Windows .NET Framework 4.8) fails to load in PowerShell 7.6 LTS which is powered by .NET 10 LTS. You'll see errors like
New-IshSessionfails withCould not load type 'System.IdentityModel.Tokens.SecurityKeyType' from assembly 'System.ServiceModel.Security, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.- Pester test harness shows error like
ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.ParameterBindingValidationException: Cannot validate argument on parameter 'IshSession'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
Microsoft .NET 10.0 broke compatibility compared to .NET 8.0.
Actions...
- Switch from .NET Standard 2.0, so covering NET48 and NET6,
System.ServiceModelversion to explicit NET10 version inTrisoft.ISHRemote.csproj -
System.IdentityModel.Tokens.SecurityKeyTypeis no longer an enum but became a string; soBearerKeyneeds to becomehttp://schemas.microsoft.com/idfx/keytype/bearer - Still deliver NET 6 code base, but make sure that the dynamic loading in
ISHRemote.psm1is correct for PowerShell 7.6 - Verify all NET 10 code, especially the Windows Communication Foundation (WCF) Soap code
- CI/CD, so
/.github/workflows/continuous-integration.yml, currently holdsPowerShell Update - 7.2.13/lts has issues, updating to latest stable (like 7.3.6 or higher)which installed 7.6 and broke all test pipelines. - Update
readme.mdinstallation routines steps to go beyond PS72/NET6 and PS74/NET8 to PS76/NET10. And as Microsoft no longer supports older PS72 and PS74, ISHRemote should mark these as deprecated and probably also not tested because there is no CI/CD available for it on Github.
Optional...
What can we do about pushing all PackageReferences for .NET 10 or all only to latest
-
Microsoft.PowerShell.Commands.Managementfrom 7.2.24 to 7.6.0 for NET10 -
Duende.IdentityModelfrom 7.1.0 to 8.1.0 for NET10 -
Duende.IdentityModel.OidcClientfrom 6.0.1 to 7.1.0 for NET10 -
System.Text.Jsonfrom 8.0.6 to 10.0.5 for NET10 -
System.Drawing.Commonfrom 8.0.8 to 10.0.5 for NET10 -
System.Numerics.Vectorsfrom 4.5.0 to 4.6.1 for NET10 -
System.Text.Encodings.Webfrom 8.0.0 to 10.0.5 for NET10 -
System.ServiceModel.*from 8.0.0 to 10.0.652802 for NET10
What can we do about warnings...
-
CertificateValidationHelper.cs(72,32,72,51): warning SYSLIB0014: 'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient. -
IshSession.cs(139,13,139,32): warning SYSLIB0014: 'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' -
InfoShareWcfSoapBearerCredentials.cs(92,20,92,94): warning SYSLIB0057: 'X509Certificate2.X509Certificate2(byte[], string?)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.'
Reactions are currently unavailable