HDFGroup / HDF.PInvoke

Raw HDF5 Power for .NET
http://www.hdfgroup.org/HDF5
Other
80 stars 29 forks source link

GetDllPathFromAppConfig Not Considering Existing Keys #184

Open MrMontana1889 opened 1 year ago

MrMontana1889 commented 1 year ago

If a program has keys specified in its config file that is NOT "NativeDependenciesAbsolutePath", then a NullReferenceException occurs on line 31 in NativeDependencies.cs where it attempts to get the path.

A null check should be added for the NativePathString key before attempting to get the value.

In the short term, I can clone and make the change locally, but this should be officially fixed and released.

This is a blocking issue for me.

Apollo3zehn commented 1 year ago

Is HDF.PInvoke.1.10 working for you? It uses as different library resolution process.

MrMontana1889 commented 1 year ago

Unfortunately, I can't use 1.10 right now since we are using 1.8 when writing results. We're hoping to move to 1.10 at some point down the road.

I have the fix locally and I can use that build for the time being, but it would be nice to use an official build of the library rather than building it locally.

Apollo3zehn commented 1 year ago

@gheber, would you accept a PR fixing this and publish a patch release on Nuget?

If yes, @MrMontana1889 , could you please create a PR?

PhilPJL commented 1 year ago

@MrMontana1889. I'm pretty sure version 1.10 saves by default in 1.8 format so using 1.10 should work fine for you. You can override this behaviour using set_libver_bounds.

gheber commented 1 year ago

@MrMontana1889. I'm pretty sure version 1.10 saves by default in 1.8 format so using 1.10 should work fine for you. You can override this behaviour using set_libver_bounds.

Yes.

gheber commented 1 year ago

@gheber, would you accept a PR fixing this and publish a patch release on Nuget?

If yes, @MrMontana1889 , could you please create a PR?

Yes.

MrMontana1889 commented 1 year ago

I'll give it a shot tomorrow.