Skip to content

[BUG] Unity Editor can’t find dependency DLLs in subfolders anymore (DLLNotFoundException) #3016

@SashelI

Description

@SashelI

Description

Hi,

I came into some frustrating issue today in the editor : I have a project in which I have manually imported libraries. All of the required dependencies are also in the project, in a subfolder (see screenshots below).

This project was working fine and finding everything it needed. Today I downloaded the new version of the libraries (from skiasharp 2.88.7 to skiasharp 2.88.8), replaced DLLs without changing any of the folder structure, and suddendly, with two different libraries (libSkiaSharp and pdfium from SkiaSharp and PDFToImage), when I hit play i have a “DLLNotFoundException” on the dependencies, but only if they are in a subfolder…

I have many dlls and .so because this is a cross-platform project (android ARM64 + android x64 + UWP ARM64 + Winx64), so putting every single dependency dll in the same folder is a no-go.

Anyone knows why this happens ?
Thanks.

Here are the screenshots :

Working old project structure, this exact same structure on the updated dlls doesn’t work, and I have to put libskiasharp.dll in the root Skia folder :

image
image

(And same goes for pdfium.dll)

Code

https://github.com/SashelI/skiadll-tests-unity

Expected Behavior

No response

Actual Behavior

DllNotFoundException: libSkiaSharp assembly:<unknown assembly> type:<unknown type> member:(null) SkiaSharp.SKImageInfo..cctor () (at <ba5db125678d4cb8bfb461a6f3fca1c2>:0) Rethrow as TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Other (Please indicate in the description)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 10 x64

Devices

No response

Relevant Screenshots

image
image

Relevant Log Output

`DllNotFoundException: libSkiaSharp assembly:<unknown assembly> type:<unknown type> member:(null)
SkiaSharp.SKImageInfo..cctor () (at <ba5db125678d4cb8bfb461a6f3fca1c2>:0)
Rethrow as TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions