Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NuGet package cache loading. #94

Open
Perksey opened this issue Sep 21, 2019 · 2 comments
Open

Add support for NuGet package cache loading. #94

Perksey opened this issue Sep 21, 2019 · 2 comments

Comments

@Perksey
Copy link
Contributor

Perksey commented Sep 21, 2019

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.
@nxrighthere
Copy link

A bit unrelated comment, but you have a typo here in .NET Core section: ManagedByRef should be ManagedByValue, it seems that it's just a copy of the actual ManagedByRef.

@Perksey
Copy link
Contributor Author

Perksey commented Mar 19, 2020

That deserves its own issue/PR I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants