Dear HDF Team,

I am currently developing a project which uses the new .NET Core framework 
instead of the "old" .NET Framework. Fortunately it is still possible to 
include .NET Framework assemblies / NuGet packages in my project. But I get the 
following warning for each project in my Visual Studio Solution:


NU1701: Package 'HDF.PInvoke 1.10.1' was restored using 
'.NETFramework,Version=v4.6.1' instead the project target framework 
'.NETStandard,Version=v2.0'. This may cause compatibility problems.


I just tried to compile the HDF.PInvoke library with netstandard2.0 as target. 
It seems nothing misses except of the ConfigurationManager class and the 
Microsoft.VisualStudio.TestTools.UnitTesting namespace which I am pretty sure 
can be solved with additional NuGet packages.


For my short test I replaced the whole .csproj content with the following XML 
(Visual Studio 2017 with new csproj format):


<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
</Project>


This would allow several frameworks to make use of the HDF.PInvoke NuGet 
package (and remove the warning). Of course it is still required to run the 
native libraries on a supported architecture / OS, but at least we are not 
forced to use the relatively old NET framework. Here is a list of supported 
platforms, depending on the version of .NET Standard:


https://docs.microsoft.com/en-us/dotnet/standard/net-standard

Best regards,

Vincent

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to