The native DLLs are not searched realtive to the HDF.PInvoke.dll

Open
#108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp

Research direction

Start in NativeDependencies.GetAssemblyName() and inspect how the assembly path is selected. Compare the behavior of Assembly.GetExecutingAssembly() with typeof(NativeDependencies).Assembly, including the use cases mentioned in the issue. Done means native DLL lookup is relative to HDF.PInvoke.dll without breaking the intended loading scenarios.

Written by the indexing model from the issue text.

Description

In NativeDependencies.GetAssemblyName() the path is selected relative to the executed assembly (the program using the DLL) and not (what I expected) relative to the DLL.

This could be fixed by replacing System.Reflection.Assembly.GetExecutingAssembly() with typeof(NativeDependencies).Assembly.

Are there any concerns or use-cases which this might destroy?

Dominant language
C#
Stars
87
Forks
32
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HDFGroup/HDF.PInvoke

All issues in HDFGroup/HDF.PInvoke

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.