Skip to content

[Bug] Android IL2CPP build fails: UnityLinker can’t resolve BouncyCastle.Cryptography with v1.2.9 #257

@MVelascoWS

Description

@MVelascoWS

Bug summary
After install v1.2.9, Android IL2CPP builds consistently fail during the Unity CIL Linker step with an assembly resolution error for BouncyCastle.Cryptography (2.x). Unity can’t find that assembly even when I add the DLL manually.

Error log (Editor.log excerpt)
Building Library\Bee\artifacts\Android\ManagedStripped failed with output: D:\Unity\Hub\Editor\6000.1.8f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\16162982357633868796.rsp Fatal error in Unity CIL Linker Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(...) at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(...) at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(...) ... UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

To Reproduce

  1. Create a new Unity project (Unity 6000.1.8f1).
  2. Add Solana.Unity-SDK v1.2.9 via Package Manager (Git URL).
  3. Switch to Android, set IL2CPP / ARM64.
  4. Build → Linker fails with Failed to resolve assembly: 'BouncyCastle.Cryptography, Version=2.0.0.0'.

Expected behavior
Android IL2CPP build succeeds (the SDK resolves its crypto dependency without manual intervention).

Unity versions tested
-6000.1.8f1 (primary)
-6000.2.7f2 (also repros)

Platform / Build settings:
-Target: Android
-Scripting Backend: IL2CPP
-Architecture: ARM64
-Managed Stripping Level: (tried Low/Medium)
-OS: Windows

Additional context
Even with BouncyCastle.Cryptography.dll (2.x, netstandard2.0) present and enabled for Android, the .rsp used by UnityLinker appears to omit the 2.x DLL (linker still reports it missing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions