Skip to content

Conversation

@tinohager
Copy link

If I understand correctly, we only need “System.Security.Cryptography.Cng” for .netstandard2.0. Perhaps we can define the dependency so that it only comes into play in that case.


<PackageReference Include="SSH.NET" Version="[2024.2.0,)" />
<PackageReference Include="Konscious.Security.Cryptography.Argon2" Version="1.3.0"/>
<PackageReference Include="SSH.NET" Version="2025.0.0" />
Copy link
Owner

Choose a reason for hiding this comment

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

This should stay in the minimal required format.

<PropertyGroup>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net48;netstandard2.0</TargetFrameworks>
<TargetFramework Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFramework>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net48;netstandard2.0;net8</TargetFrameworks>
Copy link
Owner

Choose a reason for hiding this comment

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

I think this can be adjusted to match SSH.NET:

<TargetFrameworks>net462;netstandard2.0;net8.0;net9.0</TargetFrameworks>

<ItemGroup Condition=" '$(TargetFramework)' != 'net48' ">
<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
Copy link
Owner

Choose a reason for hiding this comment

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

SSH.NET uses this, should work here too, right?

  <ItemGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) ">
    <PackageReference Include="System.Formats.Asn1" />
  </ItemGroup>

<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net48;netstandard2.0</TargetFrameworks>
<TargetFramework Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFramework>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net48;netstandard2.0;net8</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0;net8</TargetFrameworks>
Copy link
Owner

@darinkes darinkes Sep 9, 2025

Choose a reason for hiding this comment

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

Same as above, except net48

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