0 votes
by (180 points)

Hello,
I recently upgraded the Rebex.Sftp.Full library of my Xamarin Forms project to version 5.0.7244
When I want to compile the Android project with "Linking" option set to "Sdk Assembles Only", the linker raises this error:

Error       The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Threading.Tasks.Task`1<System.Int32> wriw::wqyr.xxaz()' in assembly: 'Rebex.Networking.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Rebex.Net.Tls13.Tls13Channel/tngl
   at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkWithResolvedScope(TypeReference type)
   at Mono.Linker.Steps.MarkStep.MarkIfType(CustomAttributeArgument argument)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributeArguments(CustomAttribute ca)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider)
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() APManagerXamarin.Android            

How to get rid of this error ?

As it is for release, I want to keep "Sdk Assembles Only" option active and use the linker.

Thank you in advance for your support

Greetings

J-D Gasser

Applies to: Rebex SFTP
by (148k points)
We will look into this issue!
Could you please let us know which version of Xamarin.Android you currently use?
by (180 points)
Hello,
It's a Xamarin.Forms solution, here are the versions of all NuGet packages used in the Android's project :

    <ItemGroup>
      <PackageReference Include="MvvmLightLibsStd10">
        <Version>5.4.1.1</Version>
      </PackageReference>
      <PackageReference Include="Plugin.Permissions">
        <Version>3.0.0.12</Version>
      </PackageReference>
      <PackageReference Include="Rebex.Sftp.Full">
        <Version>5.0.7244</Version>
      </PackageReference>
      <PackageReference Include="sqlite-net-standard">
        <Version>1.5.1</Version>
      </PackageReference>
      <PackageReference Include="Vapolia.XamSvg.Forms">
        <Version>3.1.6</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.Android.Support.Compat">
        <Version>28.0.0.3</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.Forms" Version="4.3.0.991211" />
      <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
      <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
      <PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
      <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.3" />
      <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.3" />
    </ItemGroup>

Xamarin Forms version is the last one (4.3.0.991211)

I compile the project with Android 9.0 (pie), minimum Android version is set to Android 5.1 (API Level 22 - Lollipop)
by (148k points)
Thanks, this might be useful as well! However, would it be possible to determine the version of Xamarin.Android SDK you currently use? The version can be found in the "Installed products" list of Visual Studio's "About" dialog, accessible via the menu: "Help -> About Microsoft Visual Studio".
by (180 points)
Sorry,
I did not understood your question, here is the complete list of installed products:
Microsoft Visual Studio Professional 2019
Version 16.3.9
VisualStudio.16.Release/16.3.9+29509.3
Microsoft .NET Framework
Version 4.8.03752

Installed Version: Professional

Visual C++ 2019   00435-60000-00000-AA777
Microsoft Visual C++ 2019

ASP.NET and Web Tools 2019   16.3.286.43615
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   16.3.286.43615
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.3.286.43615
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   16.3.286.43615
Azure Functions and Web Jobs Tools

C# Tools   3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

FillLine Extension   1.0
FillLine Visual Studio Extension Detailed Info

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20816.1

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   2.0.83+gbc8a4b23ec
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   16.3.7 (9d260c5)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   5.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Office Developer Tools for Visual Studio   16.0.29217.00
Microsoft Office Developer Tools for Visual Studio

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResXManager   1.36.2407.0
Manage localization of all ResX-Based resources in one place. Shows all resources of a solution and let's you edit the strings and their localizations in a well-arranged data grid.

SQL Server Data Tools   16.0.61908.27190
Microsoft SQL Server Data Tools

SQLite & SQL Server Compact Toolbox   4.7
SQLite & SQL Server Compact Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.

TypeScript Tools   16.0.10821.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6   16.3.0-beta.19455.1+0422ff293bb2cc722fe5021b85ef50378a9af823
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   16.3.0.278 (d16-3@40034cd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   16.3.0.256 (remotes/origin/d16-3@8a223bfd7)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   16.3.565 (27e9746)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   10.0.6.2 (d16-3/c407838)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: mono/mono/2019-06@476d72b9e32
    Java.Interop: xamarin/java.interop/d16-3@5836f58
    LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
    LibZip: nih-at/libzip/rel-1-5-1@b95cf3fd
    ProGuard: xamarin/proguard/master@905836d
    SQLite: xamarin/sqlite/3.27.1@8212a2d
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333


Xamarin.iOS and Xamarin.Mac SDK   13.6.0.12 (e3c2b40)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Hope this will be usefull
by (148k points)
Thanks a lot. You are using the latest version of Xamarin.Android SDK, which should of course be supported. We'll look into the issue and keep you updated.

1 Answer

0 votes
by (15.2k points)
edited by

Update: This has been resolved in Rebex Total Pack 2019 R4.1.

Hello, we have successfully reproduced your issue based on your development environment. Thank you for that. I share a link here for a trial hotfix build which worked for us within our application we used for reproducing the issue. I will send you a link to the full version of the same build since you have active support contract.

...