HDFGroup / HDF.PInvoke

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

Create .NET Standard project structure. #159

Closed Apollo3zehn closed 5 years ago

Apollo3zehn commented 5 years ago

Edit: CI build is working now. Next step is to update the native libs to HDF5 1.10.5.1 to allow the tests to pass. The problem was the native lib path finding mechanism. Hopefully we'll find a generic solution for this with .NET Core 3.

This pull request is related to #127 and should not be merged since it simply deletes all files and replaces them with a new project structure. Instead its purpose is to show how a pure and minimalistic .NET Standard project structure could look like.

Credits go to @surban, from whom I borrowed some code for this PR.

In PR #127, I suggested to create a second .csproj file for .NET Standard builds of HDF.PInvoke. I prepared a PR for this (and the discussion tomorrow), but in the end I found it a little confusing to mix both project styles. My intention was to show how an absolute minimum solution for .NET Standard could look like. Therefore, I finally came up with the following:

I was able to build the solution and run all tests successfully locally on my PC. Unfortunately the tests are not working on AppVeyor but I think it is only a small bug which I could not find today.

Hopefully I could help with this sample implementation. Maybe it a good idea to keep HDF.PInvoke untouched and have a second repository for .NET Standard development instead. With the submodule included, there is only a minimum of code duplication which can be reduced to zero with a few simple modifications in the original repository.

Note: The native libs are simply copied from @surban and are not the newest version. This means that some unit tests cannot pass. I guess getting the native libs automatically during the build will be the biggest discussion point.

Apollo3zehn commented 5 years ago

I close this in favor of https://github.com/HDFGroup/HDF.PInvoke.NETStandard .