Skip to content

Commit

Permalink
Require Microsoft.Bcl.AsyncInterfaces >=1.0.0 instead of =8.0.0
Browse files Browse the repository at this point in the history
This technically fixes 2 different issues:
- previously SSH.NET would require exactly(!) version 8.0.0, which would
  cause issues in the future if e.g. a project using SSH.NET would
  try to update to version 9.0.0. In this case the constraint on the
  exact version would cause NuGet to refuse to upgrade to 9.0.0 (#1287)
- PowerShell Core seems to have problems with Version 8.0.0, therefore
  downgrade the requirement to 1.0.0 (see darkoperator/Posh-SSH#558)

I had to re-enable AutoGenerateBindingRedirects, otherwise there is a
FileLoadException with net462 in one of the tests. I don't know why this
was disabled in 3ecbd10 .
  • Loading branch information
mus65 committed Jan 5, 2024
1 parent 7436a38 commit 376ec03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<LangVersion>latest</LangVersion>
<WarningLevel>9999</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>

<!--
Expand Down
4 changes: 2 additions & 2 deletions build/nuget/SSH.NET.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<tags>ssh scp sftp</tags>
<dependencies>
<group targetFramework="net462">
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="[8.0.0]" />
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="[8.0.0]" />
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" />
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
</group>
<group targetFramework="netstandard2.1">
Expand Down
2 changes: 1 addition & 1 deletion src/Renci.SshNet/Renci.SshNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0' ">
Expand Down

0 comments on commit 376ec03

Please sign in to comment.