Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
-p:CoverletOutput=../../coverlet/linux_unit_test_net_10_coverage.xml \
test/Renci.SshNet.Tests/

- name: Run Unit Tests against the .NET Standard asset
run: dotnet test -f net10.0 -p:SshNetTargetFramework=netstandard2.0 test/Renci.SshNet.Tests/

- name: Run Integration Tests .NET
run: |
dotnet test \
Expand Down
5 changes: 4 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<PackageVersion Include="coverlet.msbuild" Version="10.1.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.5" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.317" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<!-- Should stay on LTS .NET releases. -->
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.14" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
Expand All @@ -21,7 +22,9 @@
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.35.0.4138" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<!-- Should stay on LTS .NET releases. -->
<PackageVersion Include="System.Formats.Asn1" Version="10.0.14" />
<!-- The netstandard2.0 asset must also work on consumers below .NET 8. -->
<PackageVersion Include="System.Formats.Asn1" Version="8.0.2" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageVersion Include="System.Formats.Asn1" Version="10.0.14" Condition="'$(TargetFramework)' != 'netstandard2.0'" />
<PackageVersion Include="Testcontainers" Version="4.16.0" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/Renci.SshNet/Renci.SshNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Product>SSH.NET</Product>
<AssemblyTitle>SSH.NET</AssemblyTitle>
<TargetFrameworks>net462;netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks Condition="'$(SshNetTargetFramework)' != ''">$(SshNetTargetFramework)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -54,6 +55,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="System.Formats.Asn1" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions test/Renci.SshNet.Tests/Common/AsyncSocketListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
using System.Net.Sockets;
using System.Threading;

#if NET9_0_OR_GREATER
using Lock = System.Threading.Lock;
#endif

using Renci.SshNet.Common;
#pragma warning restore IDE0005

Expand Down