Skip to content

Add .NET Framework 4.8 compatibility#27

Merged
bonk-dev merged 1 commit into
bonk-dev:mainfrom
jogibear9988:main
Jul 21, 2026
Merged

Add .NET Framework 4.8 compatibility#27
bonk-dev merged 1 commit into
bonk-dev:mainfrom
jogibear9988:main

Conversation

@jogibear9988

Copy link
Copy Markdown
Contributor

Multi-target the HarpoS7, Family0, and Utilities libraries for net8.0 and netstandard2.0 so the package can be consumed by .NET Framework 4.8 applications.

Add downlevel compatibility implementations for cryptography, BigInteger serialization, stream memory APIs, embedded-resource reads, and 128-bit lookup-table operations. Remove the machine-specific net7.0 assembly reference and retain the target-host TLS overload on netstandard2.0.

Document supported frameworks, add the required package dependencies, and bump package and assembly versions to 1.1.4.

Validated with a clean .NET 8 SDK build, 197 passing tests, NuGet packing, and a .NET Framework 4.8 runtime smoke test covering the real-PLC authentication path.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.93443% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.78%. Comparing base (788045d) to head (2c48c1d).

Files with missing lines Patch % Lines
HarpoS7/Transport/CotpStream.cs 0.00% 21 Missing ⚠️
...oS7.Utilities/Compatibility/CryptoCompatibility.cs 44.44% 6 Missing and 4 partials ⚠️
HarpoS7/Compatibility/StreamCompatibility.cs 0.00% 4 Missing ⚠️
...7.Family0/Compatibility/BigIntegerCompatibility.cs 60.00% 1 Missing and 1 partial ⚠️
HarpoS7.Family0/Data/BlobReader.cs 75.00% 1 Missing and 1 partial ⚠️
HarpoS7/Auth/LegitimateScheme.cs 75.00% 0 Missing and 2 partials ⚠️
HarpoS7.Family0/Auth/RealPlcAuthenticator.cs 88.88% 1 Missing ⚠️
HarpoS7.Utilities/Extensions/SpanExtensions.cs 0.00% 1 Missing ⚠️
HarpoS7/Tls/HarpoTlsAuth.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   98.82%   98.78%   -0.05%     
==========================================
  Files          69       72       +3     
  Lines       57383    57430      +47     
  Branches      290      295       +5     
==========================================
+ Hits        56709    56731      +22     
- Misses        520      541      +21     
- Partials      154      158       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bonk-dev bonk-dev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR! Before I merge this I'd like to see the tests passing both on net8.0 and a runnable netstandard2.0 target, like .NET Framework 4.8.

I don't think the central <TargetFramework> in Directory.Build.props makes sense anymore, since we will be targeting net8.0;netstandard2.0 for the libs, something like net8.0;net48 for the test projects and a third variant for the PoC probably.

Multi-target HarpoS7, HarpoS7.Family0, HarpoS7.Utilities, and HarpoS7.PublicKeys for net8.0 and netstandard2.0 so every published HarpoS7 package can be consumed by .NET Framework 4.8 applications.

Remove the central TargetFramework from Directory.Build.props and declare targets per project type. Run the four published-library test suites on both net8.0 and net48 while keeping the PoC, key dumper, CLI, and SSL test explicitly on net8.0.

Add downlevel compatibility implementations for cryptography, BigInteger serialization, stream memory APIs, embedded-resource reads, and 128-bit lookup-table operations. Preserve AES-ECB semantics in the netstandard2.0 compatibility path, remove the machine-specific net7.0 assembly reference, and retain the target-host TLS overload on netstandard2.0.

Upgrade the NUnit adapter for current runtime discovery and add a Windows GitHub Actions test matrix for all four net48 library suites, including HarpoS7.PublicKeys. Fail the job if a suite reports zero discovered tests.

Add a permanent .NET Framework 4.8 smoke application that restores both generated NuGet packages, loads a bundled public key, and exercises the real-PLC authentication path. Gate NuGet publishing on the net48 tests and package smoke check.

Document the supported targets, add the required package dependencies, and bump package and assembly versions to 1.1.4.

Validated with the .NET 8.0.407 SDK: a warning-free solution build, 197 passing net8.0 tests, 195 passing net48 library tests, successful packing of both NuGets with net8.0 and netstandard2.0 assets, and a passing net48 package consumer run.
@jogibear9988

Copy link
Copy Markdown
Contributor Author

should be fixed

@bonk-dev
bonk-dev merged commit 19411a7 into bonk-dev:main Jul 21, 2026
3 of 5 checks passed
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.

2 participants