Skip to content

Fix netstandard dependency compatibility for pre-.NET 8 consumers - #1866

Open
hugodeco wants to merge 1 commit into
sshnet:developfrom
sufficit:fix/netstandard-asn1-net7
Open

hugodeco wants to merge 1 commit into
sshnet:developfrom
sufficit:fix/netstandard-asn1-net7

Conversation

@hugodeco

Copy link
Copy Markdown

Consuming the SSH.NET 2026 netstandard2.0 asset from net7.0 fails a warnings-as-errors build because System.Formats.Asn1 10 requires a newer supported runtime. The same asset also exposes IAsyncEnumerable through ListDirectoryAsync without declaring Microsoft.Bcl.AsyncInterfaces directly: modern consumers select the modern logging asset, lose the indirect interface dependency, and fail with CS0012.

This change uses ASN.1 8.0.2 for netstandard2.0 and declares AsyncInterfaces 8.0.0 directly for that asset. Other assets retain their existing dependency choices. No SSH.NET downgrade or SCP security fix is reverted, and no TFM warning is suppressed. An opt-in build property lets the existing unit suite exercise the netstandard2.0 library from a current test host; Linux CI runs that path. The socket test helper explicitly selects the host Lock to avoid an ambiguous reference to the compatibility implementation.

Validation:

  • Release pack/build succeeded for all five existing assets (net462, netstandard2.0, net8, net9 and net10).
  • Native net10 unit suite: 2,388 passed, 45 skipped, zero failures.
  • The same suite against netstandard2.0: 2,388 passed, 45 skipped, zero failures, including the existing cryptography and SCP security regressions.
  • A consumer of the final nupkg built net7.0 with -warnaserror, then ran under native .NET 7.0.20: six encrypted/unencrypted PKCS8 key fixtures (RSA, ECDSA, Ed25519), signing/verification, altered-message rejection, and disconnected async SFTP enumeration passed.
  • Applying the dependency adjustments to the 2026.0.0 tag also built netstandard2.0 and passed the native-net7 PKCS8 smoke checks.
  • Consumer transitive audit found no vulnerable packages. Docker/external-server integration tests were not run locally.

Compatibility and validation record. This is compatibility of an existing netstandard2.0 asset, not a claim of renewed official support for the end-of-life .NET 7 runtime.

AI disclosure: implementation, investigation, tests and this description were prepared by OpenAI Codex at the maintainer's request. This submission is made through hugodeco's GitHub account at his explicit request. No human line-by-line review is asserted.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant