sshnet / sshnet/SSH.NET

Release 2024.2.0 breaks compatibility with Mono on Android

Open
#1,685 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

I started out with 25.0.0 and using the following code:

using var sftpClient = new SftpClient("somehost.com", "someuser", "somepassword");
sftpClient.Connect();

string imageFile = "/home/someuser/shared/somefile.png";
using var stream = new MemoryStream();

sftpClient.DownloadFile(imageFile, stream, x =>
{
    Console.Clear();
    Console.SetCursorPosition(0, 0);
    Console.Write($"{x / 1024 / 1024:000}%");
});

sftpClient.Disconnect();

It would fail at sftpClient.DownloadFile(...)

Output:

ssh.net System.IO.FileNotFoundException: Could not load file or assembly 'System.Numerics.Vectors`

I then started from 2020.0.1 which worked like a charm.
I then tried the following versions:

-2020.0.2

  • 2023.0.0
  • 2024.0.0
  • 2024.1.0

These all worked.
When I tried 2024.2.0 I ran into the same issue again.

Godot 3.x uses Mono on Android instead of .NET5/6/7/8/9
I report this in the hopes it can be solved, but also as a workaround for anyone who needs it: Stick with 2024.1.0 for now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sample SftpClient.DownloadFile call under Godot 3.x Mono on Android with SSH.NET 2024.2.0, then compare it with 2024.1.0 and check the System.Numerics.Vectors loading failure. Done means the download works on the affected Mono Android environment without requiring users to remain on 2024.1.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp, godot
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.