HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

Vincent

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.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

Haymo Kutschbach

Hi Vincent,

 

there is an issue on the HDF/PInvoke github site with a related discussion:

 

https://github.com/HDFGroup/HDF.PInvoke/issues/57

 

In short: there seems to be no consensus among the users of HDF/PInvoke, whether .NET Standard is the way to go. Please contribute your arguments to the discussion!

 

Btw, .NET Framework is just another runtime of .NET and not considered ‘outdated’ nor deprecated. According to my (unrepresentative) insight among ILNumerics customers it is still by far the most popular .NET production runtime. This, of course may change once the tooling support for .NET Standard / .NET Core is further improving.

 

Best regards

Haymo

--

-------------------------

Haymo Kutschbach

ILNumerics GmbH

 

[hidden email]

 

ILNumerics GmbH

Danziger Str. 219

10407 Berlin

 

Tel: +49 30 4208 7799

Fax: +49 30 4208 7775

 

http://www.ilnumerics.net

http://twitter.com/ilnumerics

 

Registergericht: Amtsgericht Potsdam

Registernummer: HRB 26715 P

Geschäftsführung: Haymo Kutschbach

 

From: Hdf-forum [mailto:[hidden email]] On Behalf Of Vincent Wilms
Sent: Montag, 8. Januar 2018 18:27
To: HDF Users Discussion List
Subject: [Hdf-forum] HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

 

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.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

Vincent

Hi Haymo,


thanks for the hint to the repository, I will follow up the issue you mentioned. I was not trying to say that .NET is outdated but instead that the tight coupling to .NET prevents users from using .NET Core and its new features. In the end I would like to run my software also on Linux, either with or without HDF included (it is just one of several plugins). I saw your arguments against using .NET Standard to avoid the assumption that the library runs on all platforms and hope that instead another solution will be found to have again a clean development experience.


Thanks and best regards,

Vincent



Von: Hdf-forum <[hidden email]> im Auftrag von Haymo Kutschbach <[hidden email]>
Gesendet: Mittwoch, 10. Januar 2018 17:10
An: 'HDF Users Discussion List'
Betreff: Re: [Hdf-forum] HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?
 

Hi Vincent,

 

there is an issue on the HDF/PInvoke github site with a related discussion:

 

https://github.com/HDFGroup/HDF.PInvoke/issues/57

 

In short: there seems to be no consensus among the users of HDF/PInvoke, whether .NET Standard is the way to go. Please contribute your arguments to the discussion!

 

Btw, .NET Framework is just another runtime of .NET and not considered ‘outdated’ nor deprecated. According to my (unrepresentative) insight among ILNumerics customers it is still by far the most popular .NET production runtime. This, of course may change once the tooling support for .NET Standard / .NET Core is further improving.

 

Best regards

Haymo

--

-------------------------

Haymo Kutschbach

ILNumerics GmbH

 

[hidden email]

 

ILNumerics GmbH

Danziger Str. 219

10407 Berlin

 

Tel: +49 30 4208 7799

Fax: +49 30 4208 7775

 

http://www.ilnumerics.net

http://twitter.com/ilnumerics

 

Registergericht: Amtsgericht Potsdam

Registernummer: HRB 26715 P

Geschäftsführung: Haymo Kutschbach

 

From: Hdf-forum [mailto:[hidden email]] On Behalf Of Vincent Wilms
Sent: Montag, 8. Januar 2018 18:27
To: HDF Users Discussion List
Subject: [Hdf-forum] HDF.PInvoke: possible to target NET Standard 1.0 or higher instead of targetting only NET Framework 2.0?

 

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.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5