SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.38k stars 192 forks source link

Target Multiple Frameworks #36

Closed fdncred closed 6 years ago

fdncred commented 6 years ago

Are there any objections to changing the csproj from this:

<TargetFramework>netstandard2.0</TargetFramework>

To this?

<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>

This just allows one to test with the normal dotnet framework as well as dotnet standard.

dotChris90 commented 6 years ago

From my side not. Ah understand. Otherwise u must every time do manually change when somebody here do a pull request and change. I think multiple targets is OK as long as full . Net framework is supported by Microsoft.

Oceania2018 commented 6 years ago

@fdncred .netstatndard 2.0 should work for net472. You don't have to flag it explicitly.

dotChris90 commented 6 years ago

Ah depends on what he wanna do. If he want to take the DLL to python.net or Matlab.... Standard don't work. It must be net 471 or what ever.

I have no idea why but.... I faced this problem last year when supporting a simulation department lol

The meta data in a full. Net DLL and standard DLL seems to be different.

If he stays in net world. Yes doesn't matter

fdncred commented 6 years ago

Added multitargeting with 0b7cf4e557a14731fffa4bc06950c2db0f6f1c8b

fdncred commented 6 years ago

And now 2af9f96deb7e904f696aa01084af00e9e0da5b96

Oceania2018 commented 6 years ago

Hi @fdncred , could you not add the net472 currently? Just made it at you local before we figure out how to build on AppVeyor. image

Oceania2018 commented 6 years ago

@fdncred, I can't compile due to lack of net472 sdk locally.

image

fdncred commented 6 years ago

Sure. Sorry for the problem. I think it's because there are no under the .

Oh, I see you're missing the framework entirely. Perhaps we could change it to 451 or something older?

I currently have this in mine locally.

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
        <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
        <Authors>Haiping Chen</Authors>
        <Description>NumPy port in C#</Description>
        <PackageProjectUrl>https://github.com/Oceania2018/NumSharp</PackageProjectUrl>
        <Copyright>Apache 2.0</Copyright>
        <RepositoryUrl>https://github.com/Oceania2018/NumSharp</RepositoryUrl>
        <PackageReleaseNotes>Implemented arange, reshape, max, min, normalize.</PackageReleaseNotes>
        <AssemblyVersion>0.1.0.0</AssemblyVersion>
        <FileVersion>0.1.0.0</FileVersion>
        <RepositoryType>git</RepositoryType>
        <PackageTags>NumPy, NumSharp, MachineLearning, Math, Scientific, Numeric</PackageTags>
        <Version>0.1.0</Version>
        <PackageLicenseUrl>https://raw.githubusercontent.com/Oceania2018/NumSharp/master/LICENSE</PackageLicenseUrl>
        <LangVersion>latest</LangVersion>
    </PropertyGroup>

    <PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
        <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
        <DefineConstants>DEBUG;TRACE</DefineConstants>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
        <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
    </ItemGroup>

</Project>
fdncred commented 6 years ago

The list of viable frameworks for

dotChris90 commented 6 years ago

We should probably go with net standard 2.1 when it is official out.

It has the span and lot other Apis

https://blogs.msdn.microsoft.com/dotnet/2018/11/05/announcing-net-standard-2-1/

Latest news

Oceania2018 commented 6 years ago

I changed back to netstandard 2.0, just added System.Memory, Span is included.

dotChris90 commented 6 years ago

Also an option. Just mean. When standard 2.1 is out we can go with it. :)

fdncred commented 6 years ago

FYI - net472, netstandard2.0, and netcoreapp2.1 all work with Span. I just tested 472 and netstandard2.0. Made some minor modifications with bd639502d052288d8e5a8337650afe92654cf532.