Skip to content

Add support for NuGet package cache loading. #94

@Perksey

Description

@Perksey

Is your feature request related to a problem? Please describe.
Recently, when trying to distribute a package containing native packages with the intention of invoking them using ADL, I noticed that ADL would not find the library on a non-RID-specific build but DllImport can.

I then found out that DllImport also checks the NuGet cache for native assemblies, but ADL doesn't.

Describe the solution you'd like
We need to investigate the best way to search across multiple paths similar to CoreFX. This could be done internally, or we could expose an API similar to .NET Core 3's new NativeLibrary API and use DllImportSearchPaths.

Either way, we need to find out what paths we need to be looking in and then we can go from there.

Additional context

  • CoreFX doesn't copy native libraries unless you build with a RID specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions