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

NativeAOT Libraries support for DllImportSearchPath.AssemblyDirectory is undefined #90131

Open
AaronRobinsonMSFT opened this issue Aug 8, 2023 · 3 comments

Comments

@AaronRobinsonMSFT
Copy link
Member

In #90120 support was added for NativeAOT applications to respect DllImportSearchPath.AssemblyDirectory as relative to the binary on disk. However, this doesn't necessarily apply to NativeAOT scenarios for libraries.

  • What should the assembly directory be when a class library is NativeAOT'd?

See original application issue at #89874.

@ghost
Copy link

ghost commented Aug 8, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

In #90120 support was added for NativeAOT applications to respect DllImportSearchPath.AssemblyDirectory as relative to the binary on disk. However, this doesn't necessarily apply to NativeAOT scenarios for libraries.

  • What should the assembly directory be when a class library is NativeAOT'd?

See original application issue at #89874.

Author: AaronRobinsonMSFT
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: Future

@AaronRobinsonMSFT
Copy link
Member Author

/cc @elinor-fung

@jkotas
Copy link
Member

jkotas commented Aug 9, 2023

The underlaying problem is that AppContext.BaseDirectory is defined as Environment.ProcessPath directory:

It does not necessarily work well for AOT compiler libraries if they are in different directory than the process itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants