Skip to content

Commit

Permalink
Port projects to .Net Core
Browse files Browse the repository at this point in the history
FSharpLu.Json targets NETStandard2.0 net452 and net461
FSharpLu targets .net framework net452 and net461
Merge nuspec files into project files
Build with dotnet
Downgrade FsCheck to 2.7.0 - See fscheck/FsCheck#380
Adapt nuget packing scripts to dotnet
Specify package version as parameter to packnuget.ps1
AssemblyVersion info now set from packnuget.ps1
Add XML doc to nuget
  • Loading branch information
blumu committed Aug 28, 2017
1 parent a555a95 commit 66bcc65
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 272 deletions.
9 changes: 5 additions & 4 deletions FSharpLu.Json/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ open System.Runtime.InteropServices
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("Microsoft")>]
[<assembly: AssemblyProduct("FSharpLu.Json")>]
[<assembly: AssemblyCopyright("Copyright © 2016")>]
[<assembly: AssemblyCopyright("Copyright © Microsoft")>]
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]

Expand All @@ -33,9 +33,10 @@ open System.Runtime.InteropServices
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [<assembly: AssemblyVersion("1.0.*")>]
[<assembly: AssemblyVersion("0.9.*")>]
[<assembly: AssemblyFileVersion("0.9.*")>]
// [<assembly: AssemblyVersion("0.10.*")>]
[<assembly: AssemblyVersion("0.10.*")>]
[<assembly: AssemblyFileVersion("0.10.*")>]
[<assembly: AssemblyInformationalVersion("0.10.*")>]

#if DELAYSIGNING
[<assembly:AssemblyDelaySignAttribute(true)>]
Expand Down
83 changes: 28 additions & 55 deletions FSharpLu.Json/FSharpLu.Json.fsproj
Original file line number Diff line number Diff line change
@@ -1,84 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>81eaf46a-bf20-4871-bf8e-c94fd478e9e8</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>FSharpLu.Json</RootNamespace>
<TargetFrameworks>netstandard2.0;net452;net461</TargetFrameworks>
<PackageId>Microsoft.FSharpLu.Json</PackageId>
<Authors>[email protected]</Authors>
<Company>Microsoft</Company>
<Product>Microsoft.FSharpLu.Json</Product>
<Description>Json serialization converters for F# option types and discriminated unions.</Description>
<Copyright>Copyright Microsoft</Copyright>
<PackageTags>F#, FSharp, Utilities, Json, discriminated unions</PackageTags>
<PackageReleaseNotes>Port project to .NET Core</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/Microsoft/fsharplu</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/Microsoft/fsharplu/blob/master/LICENSE.MD</PackageLicenseUrl>
<RepositoryUrl>https://github.com/Microsoft/fsharplu/</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.FSharpLu.Json.Xml</DocumentationFile>
<AssemblyName>Microsoft.FSharpLu.Json</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>FSharpLu.Json</Name>
<TargetFrameworkProfile />
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;$(CompilationSymbols)</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\Microsoft.FSharpLu.Json.XML</DocumentationFile>
<DefineConstants>DEBUG;TRACE;$(CompilationSymbols)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;$(CompilationSymbols)</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\Microsoft.FSharpLu.Json.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />

<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Helpers.fs" />
<Compile Include="WithFunctor.fs" />
<Compile Include="Default.fs" />
<Compile Include="Compact.fs" />
<Compile Include="BackwardCompatible.fs" />
<Content Include="packages.config" />
<None Include="FSharpLu.Json.nuspec" />
<None Include="Script.fsx" />
<None Include="Scripts\load-references-release.fsx" />
<None Include="Scripts\load-project-release.fsx" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

</Project>
17 changes: 0 additions & 17 deletions FSharpLu.Json/FSharpLu.Json.nuspec

This file was deleted.

4 changes: 0 additions & 4 deletions FSharpLu.Json/packages.config

This file was deleted.

20 changes: 10 additions & 10 deletions FSharpLu.Tests/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open System.Reflection
open System.Runtime.CompilerServices
open System.Runtime.InteropServices

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[<assembly: AssemblyTitle("FSharpLu.Tests")>]
Expand All @@ -16,26 +16,26 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[<assembly: ComVisible(false)>]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[<assembly: Guid("1a22180f-57c3-4415-8d1a-4ad523967251")>]

// Version information for an assembly consists of the following four values:
//
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [<assembly: AssemblyVersion("1.0.*")>]
[<assembly: AssemblyVersion("1.0.0.0")>]
[<assembly: AssemblyFileVersion("1.0.0.0")>]
// [<assembly: AssemblyVersion("0.10.*")>]
[<assembly: AssemblyVersion("0.10.*")>]
[<assembly: AssemblyFileVersion("0.10.*")>]

do
()
92 changes: 11 additions & 81 deletions FSharpLu.Tests/FSharpLu.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,92 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>1a22180f-57c3-4415-8d1a-4ad523967251</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>FSharpLu.Tests</RootNamespace>
<AssemblyName>Microsoft.FSharpLu.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>FSharpLu.Tests</Name>
<TargetFrameworkProfile />
<TargetFrameworks>net452;net461</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\FSharpLu.Tests.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\FSharpLu.Tests.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Async.fs" />
<Compile Include="JsonTests.fs" />
<Content Include="packages.config" />
<Content Include="App.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<ProjectReference Include="..\FSharpLu.Json\FSharpLu.Json.fsproj">
<Name>FSharpLu.Json</Name>
<Project>{81eaf46a-bf20-4871-bf8e-c94fd478e9e8}</Project>
<Private>True</Private>
</ProjectReference>
<Reference Include="FsCheck">
<HintPath>..\packages\FsCheck.2.4.0\lib\net45\FsCheck.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="mscorlib" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<ProjectReference Include="..\FSharpLu\FSharpLu.fsproj">
<Name>FSharpLu</Name>
<Project>{77c664be-dd18-476d-ab71-1144107de408}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
<PackageReference Include="FsCheck" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FSharpLu.Json\FSharpLu.Json.fsproj" />
<ProjectReference Include="..\FSharpLu\FSharpLu.fsproj" />
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

</Project>
5 changes: 0 additions & 5 deletions FSharpLu.Tests/packages.config

This file was deleted.

14 changes: 9 additions & 5 deletions FSharpLu.sln
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25123.0
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpLu", "FSharpLu\FSharpLu.fsproj", "{77C664BE-DD18-476D-AB71-1144107DE408}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpLu", "FSharpLu\FSharpLu.fsproj", "{77C664BE-DD18-476D-AB71-1144107DE408}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpLu.Tests", "FSharpLu.Tests\FSharpLu.Tests.fsproj", "{1A22180F-57C3-4415-8D1A-4AD523967251}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpLu.Tests", "FSharpLu.Tests\FSharpLu.Tests.fsproj", "{1A22180F-57C3-4415-8D1A-4AD523967251}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1FF1118A-322F-4F49-AF9A-ED825DE70260}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
FSharpLu.Json.md = FSharpLu.Json.md
FSharpLu\FSharpLu.nuspec = FSharpLu\FSharpLu.nuspec
LICENSE.MD = LICENSE.MD
msft-StrongName.pub = msft-StrongName.pub
README.md = README.md
Expand All @@ -25,11 +24,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{EE6A3D
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpLu.Json", "FSharpLu.Json\FSharpLu.Json.fsproj", "{81EAF46A-BF20-4871-BF8E-C94FD478E9E8}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpLu.Json", "FSharpLu.Json\FSharpLu.Json.fsproj", "{81EAF46A-BF20-4871-BF8E-C94FD478E9E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{A76DC263-365A-457C-A1C2-E4C05986061B}"
ProjectSection(SolutionItems) = preProject
scripts\build.ps1 = scripts\build.ps1
scripts\packnuget.ps1 = scripts\packnuget.ps1
scripts\Update-AssemblyVersion.ps1 = scripts\Update-AssemblyVersion.ps1
EndProjectSection
EndProject
Global
Expand All @@ -54,4 +55,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6F75AF17-842A-4A81-ACE4-78856BE9BA77}
EndGlobalSection
EndGlobal
9 changes: 5 additions & 4 deletions FSharpLu/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ associated with an assembly. *)
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("Microsoft")>]
[<assembly: AssemblyProduct("FSharpLu")>]
[<assembly: AssemblyCopyright("Copyright © 2015")>]
[<assembly: AssemblyCopyright("Copyright © Microsoft")>]
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]

Expand All @@ -33,9 +33,10 @@ COM, set the ComVisible attribute to true on that type. *)
You can specify all the values or you can default the Build and Revision Numbers
by using the '*' as shown below:
[<assembly: AssemblyVersion("1.0.*")>] *)
[<assembly: AssemblyVersion("0.9.*")>]
[<assembly: AssemblyFileVersion("0.9.*")>]
[<assembly: AssemblyVersion("0.10.*")>] *)
[<assembly: AssemblyVersion("0.10.*")>]
[<assembly: AssemblyFileVersion("0.10.*")>]
[<assembly: AssemblyInformationalVersion("0.10.*")>]

#if DELAYSIGNING
[<assembly:AssemblyDelaySignAttribute(true)>]
Expand Down
Loading

0 comments on commit 66bcc65

Please sign in to comment.