Add the System.IO.Ports dependency to modern projects

Proprietary

Opt-in dependency-only port for resolved System.IO.Ports API use. Preserve C# source and add the matching System.IO.Ports major.0.0 package only to modeled SDK projects targeting a single unconditional net6.0 through net10.0. Skip existing direct/transitive packages, conditional or central package policy, custom imports/items, ambiguous directory ownership and unmodeled projects. Does not retarget projects or establish platform, native-asset or serial-device parity. Can follow an explicit SDK-style net48 retarget in the same pass; remains outside automatic version composites.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFrameworkToDotNet.AddSystemIOPortsPackage

Optional

RegenerateMarkerBoolean

Restore the final graph after the edit. Disable intermediate restores when composing with further project edits and finish with EnsureCsprojAttestation.

mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFrameworkToDotNet.AddSystemIOPortsPackage

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Ensure csproj attestation