Browse Source

Add NETSTANDARD define to the FSharp compilation, attempt to get multitargeting working

build
Ignas Anikevicius 9 years ago
parent
commit
7b3794ced9
  1. 2
      src/FSharp/AssemblyInfo.fs
  2. 2
      src/FSharp/BigIntegerExtensions.fs
  3. 28
      src/FSharp/FSharp-2017.fsproj
  4. 2
      src/FSharp/Random.fs

2
src/FSharp/AssemblyInfo.fs

@ -48,7 +48,7 @@ open System.Runtime.InteropServices
[<assembly: AssemblyFileVersion("3.20.0.0")>]
[<assembly: AssemblyInformationalVersion("3.20.0")>]
#if PORTABLE
#if PORTABLE || NETSTANDARD
#else
[<assembly: ComVisible(false)>]
[<assembly: Guid("048BC4EB-CE2B-4040-9967-4784F5405B0F")>]

2
src/FSharp/BigIntegerExtensions.fs

@ -1,6 +1,6 @@
namespace System.Numerics
#if PORTABLE
#if PORTABLE || NETSTANDARD
#if NOSYSNUMERICS
#else

28
src/FSharp/FSharp-2017.fsproj

@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--<TargetFrameworks>net45;netstandard1.6</TargetFrameworks>-->
<!--<TargetFramework>netstandard1.6</TargetFramework>-->
<TargetFramework>net45</TargetFramework>
<TargetFrameworks>net45;netstandard1.6</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<AssemblyName>MathNet.Numerics.FSharp</AssemblyName>
<RootNamespace>MathNet.Numerics</RootNamespace>
@ -11,10 +9,28 @@
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<DefineConstants>NETSTANDARD;NOSYSNUMERICS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" />
<ItemGroup>
<Reference Include="mscorlib" />
<PackageReference Include="FSharp.Core" Version="4.2.*" Private="True" />
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.2.*" PrivateAssets="All" />
<ProjectReference Include="..\Numerics\Numerics.csproj" />
</ItemGroup>
<ItemGroup>

2
src/FSharp/Random.fs

@ -49,7 +49,7 @@ module Random =
let inline system () = SystemRandomSource() :> System.Random
let inline systemSeed (seed:int) = SystemRandomSource(seed) :> System.Random
#if PORTABLE
#if PORTABLE || NETSTANDARD
#else
/// Creates a default .Net cryptographic system pRNG
let inline crypto () = new CryptoRandomSource() :> System.Random

Loading…
Cancel
Save