Skip to content

Commit 10dc398

Browse files
panesofglasseulerfx
authored andcommitted
Work on packaging for netstandard2.0
1 parent ec2b93d commit 10dc398

13 files changed

Lines changed: 269 additions & 1208 deletions

FSharp.Control.AsyncSeq.sln

Lines changed: 50 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1+
12
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 14
3-
VisualStudioVersion = 14.0.24720.0
4-
MinimumVisualStudioVersion = 10.0.40219.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
56
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B98-5CED-492C-A5B7-A5B4F73CF142}"
67
ProjectSection(SolutionItems) = preProject
78
paket.dependencies = paket.dependencies
89
paket.lock = paket.lock
910
EndProjectSection
1011
EndProject
11-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}"
12-
EndProject
13-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq", "src\FSharp.Control.AsyncSeq\FSharp.Control.AsyncSeq.fsproj", "{2D4F3D0E-0E18-48D7-9C27-98864039393D}"
14-
EndProject
1512
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
1613
ProjectSection(SolutionItems) = preProject
1714
build.fsx = build.fsx
@@ -20,56 +17,74 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60
2017
RELEASE_NOTES.md = RELEASE_NOTES.md
2118
EndProjectSection
2219
EndProject
23-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175-43B1-4C90-A1EE-8E351C33435D}"
24-
ProjectSection(SolutionItems) = preProject
25-
docs\tools\generate.fsx = docs\tools\generate.fsx
26-
docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml
27-
EndProjectSection
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}"
2821
EndProject
2922
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}"
3023
ProjectSection(SolutionItems) = preProject
3124
docs\content\index.md = docs\content\index.md
3225
docs\content\terminology.md = docs\content\terminology.md
3326
EndProjectSection
3427
EndProject
35-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}"
36-
EndProject
37-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq.Tests", "tests\FSharp.Control.AsyncSeq.Tests\FSharp.Control.AsyncSeq.Tests.fsproj", "{ADBD32DB-B7AC-4E81-9507-28F329AF23E7}"
38-
EndProject
3928
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{B4BB88FA-DB8C-4651-9869-A8FEA79F044E}"
4029
ProjectSection(SolutionItems) = preProject
4130
docs\content\library\AsyncSeq.fsx = docs\content\library\AsyncSeq.fsx
4231
docs\content\library\AsyncSeqExamples.fsx = docs\content\library\AsyncSeqExamples.fsx
4332
EndProjectSection
4433
EndProject
45-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq.Profile7", "src\FSharp.Control.AsyncSeq.Profile7\FSharp.Control.AsyncSeq.Profile7.fsproj", "{114DCF3C-D7CC-4E53-AFF0-AFBFC0C8B966}"
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175-43B1-4C90-A1EE-8E351C33435D}"
35+
ProjectSection(SolutionItems) = preProject
36+
docs\tools\generate.fsx = docs\tools\generate.fsx
37+
docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml
38+
EndProjectSection
39+
EndProject
40+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{86625A13-D7E2-4EAD-B13A-4F37BD89DE2A}"
41+
EndProject
42+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq", "src\FSharp.Control.AsyncSeq\FSharp.Control.AsyncSeq.fsproj", "{73959F56-6BF7-4B09-B361-4CE67396CE06}"
43+
EndProject
44+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{561B2DD4-BBFB-4E0D-BF73-C10A3E42507C}"
45+
EndProject
46+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Control.AsyncSeq.Tests", "tests\FSharp.Control.AsyncSeq.Tests\FSharp.Control.AsyncSeq.Tests.fsproj", "{F2404B35-0DAD-483D-9406-7C763CDDC029}"
4647
EndProject
4748
Global
4849
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4950
Debug|Any CPU = Debug|Any CPU
51+
Debug|x64 = Debug|x64
52+
Debug|x86 = Debug|x86
5053
Release|Any CPU = Release|Any CPU
51-
EndGlobalSection
52-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
53-
{2D4F3D0E-0E18-48D7-9C27-98864039393D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{2D4F3D0E-0E18-48D7-9C27-98864039393D}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{2D4F3D0E-0E18-48D7-9C27-98864039393D}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{2D4F3D0E-0E18-48D7-9C27-98864039393D}.Release|Any CPU.Build.0 = Release|Any CPU
57-
{ADBD32DB-B7AC-4E81-9507-28F329AF23E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
58-
{ADBD32DB-B7AC-4E81-9507-28F329AF23E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
59-
{ADBD32DB-B7AC-4E81-9507-28F329AF23E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
60-
{ADBD32DB-B7AC-4E81-9507-28F329AF23E7}.Release|Any CPU.Build.0 = Release|Any CPU
61-
{114DCF3C-D7CC-4E53-AFF0-AFBFC0C8B966}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62-
{114DCF3C-D7CC-4E53-AFF0-AFBFC0C8B966}.Debug|Any CPU.Build.0 = Debug|Any CPU
63-
{114DCF3C-D7CC-4E53-AFF0-AFBFC0C8B966}.Release|Any CPU.ActiveCfg = Release|Any CPU
64-
{114DCF3C-D7CC-4E53-AFF0-AFBFC0C8B966}.Release|Any CPU.Build.0 = Release|Any CPU
54+
Release|x64 = Release|x64
55+
Release|x86 = Release|x86
6556
EndGlobalSection
6657
GlobalSection(SolutionProperties) = preSolution
6758
HideSolutionNode = FALSE
6859
EndGlobalSection
60+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
61+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|x64.ActiveCfg = Debug|x64
64+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|x64.Build.0 = Debug|x64
65+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|x86.ActiveCfg = Debug|x86
66+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Debug|x86.Build.0 = Debug|x86
67+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|Any CPU.ActiveCfg = Release|Any CPU
68+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|Any CPU.Build.0 = Release|Any CPU
69+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|x64.ActiveCfg = Release|x64
70+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|x64.Build.0 = Release|x64
71+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|x86.ActiveCfg = Release|x86
72+
{73959F56-6BF7-4B09-B361-4CE67396CE06}.Release|x86.Build.0 = Release|x86
73+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
74+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|Any CPU.Build.0 = Debug|Any CPU
75+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|x64.ActiveCfg = Debug|x64
76+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|x64.Build.0 = Debug|x64
77+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|x86.ActiveCfg = Debug|x86
78+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Debug|x86.Build.0 = Debug|x86
79+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|Any CPU.ActiveCfg = Release|Any CPU
80+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|Any CPU.Build.0 = Release|Any CPU
81+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|x64.ActiveCfg = Release|x64
82+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|x64.Build.0 = Release|x64
83+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|x86.ActiveCfg = Release|x86
84+
{F2404B35-0DAD-483D-9406-7C763CDDC029}.Release|x86.Build.0 = Release|x86
85+
EndGlobalSection
6986
GlobalSection(NestedProjects) = preSolution
70-
{83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
71-
{8E6D5255-776D-4B61-85F9-73C37AA1FB9A} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
72-
{ADBD32DB-B7AC-4E81-9507-28F329AF23E7} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
73-
{B4BB88FA-DB8C-4651-9869-A8FEA79F044E} = {8E6D5255-776D-4B61-85F9-73C37AA1FB9A}
87+
{73959F56-6BF7-4B09-B361-4CE67396CE06} = {86625A13-D7E2-4EAD-B13A-4F37BD89DE2A}
88+
{F2404B35-0DAD-483D-9406-7C763CDDC029} = {561B2DD4-BBFB-4E0D-BF73-C10A3E42507C}
7489
EndGlobalSection
7590
EndGlobal

build.fsx

Lines changed: 35 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
open Fake
88
open Fake.Git
9-
open Fake.AssemblyInfoFile
109
open Fake.ReleaseNotesHelper
1110
open System
1211
open System.IO
@@ -15,35 +14,14 @@ open System.IO
1514
// START TODO: Provide project-specific details below
1615
// --------------------------------------------------------------------------------------
1716

18-
// Information about the project are used
19-
// - for version and project name in generated AssemblyInfo file
20-
// - by the generated NuGet package
21-
// - to run tests and to publish documentation on GitHub gh-pages
22-
// - for documentation, you also need to edit info in "docs/tools/generate.fsx"
23-
2417
// The name of the project
2518
// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src')
26-
let project = "FSharp.Control.AsyncSeq"
27-
28-
// Short summary of the project
29-
// (used as description in AssemblyInfo and as a short summary for NuGet package)
30-
let summary = "Asynchronous sequences for F#"
31-
32-
// Longer description of the project
33-
// (used as a description for NuGet package; line breaks are automatically cleaned up)
34-
let description = "Asynchronous sequences for F#"
35-
36-
// List of author names (for NuGet package)
37-
let authors = [ "Tomas Petricek"; "Don Syme"; "Lev Gorodinski" ]
38-
39-
// Tags for your project (for NuGet package)
40-
let tags = "F#, async, fsharpx"
19+
let project = "src/FSharp.Control.AsyncSeq"
4120

4221
// File system information
43-
let solutionFile = "FSharp.Control.AsyncSeq.sln"
22+
let solutionFile = "FSharp.Control.AsyncSeq.sln"
4423

45-
// Pattern specifying assemblies to be tested using NUnit
46-
let testAssemblies = "tests/**/bin/Release/*Tests*.dll"
24+
let buildDir = "bin"
4725

4826
// Git configuration (used for publishing documentation in gh-pages branch)
4927
// The profile where the project is posted
@@ -63,24 +41,6 @@ let gitRaw = environVarOrDefault "gitRaw" "https://raw.github.com/fsprojects"
6341
// Read additional information from the release notes document
6442
let release = LoadReleaseNotes "RELEASE_NOTES.md"
6543

66-
let genFSAssemblyInfo (projectPath) =
67-
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
68-
let folderName = System.IO.Path.GetDirectoryName(projectPath)
69-
let basePath = "src" @@ folderName
70-
let fileName = basePath @@ "AssemblyInfo.fs"
71-
CreateFSharpAssemblyInfo fileName
72-
[ Attribute.Title (projectName)
73-
Attribute.Product project
74-
Attribute.Description summary
75-
Attribute.Version release.AssemblyVersion
76-
Attribute.FileVersion release.AssemblyVersion ]
77-
78-
// Generate assembly info files with the right version & up-to-date information
79-
Target "AssemblyInfo" (fun _ ->
80-
let fsProjs = !! "src/**/*.fsproj"
81-
fsProjs |> Seq.iter genFSAssemblyInfo
82-
)
83-
8444
// --------------------------------------------------------------------------------------
8545
// Clean build results
8646

@@ -96,37 +56,53 @@ Target "CleanDocs" (fun _ ->
9656
// Build library & test project
9757

9858
Target "Build" (fun _ ->
99-
!! solutionFile
100-
|> MSBuildRelease "" "Rebuild"
101-
|> ignore
59+
DotNetCli.Build (fun p ->
60+
{ p with
61+
Project = solutionFile
62+
Configuration = "Release" })
10263
)
10364

10465
// --------------------------------------------------------------------------------------
10566
// Run the unit tests using test runner
10667

10768
Target "RunTests" (fun _ ->
108-
!! testAssemblies
109-
|> NUnit (fun p ->
110-
{ p with
111-
DisableShadowCopy = true
112-
TimeOut = TimeSpan.FromMinutes 20.
113-
OutputFile = "TestResults.xml" })
69+
try
70+
DotNetCli.Test(fun p ->
71+
{ p with
72+
Project = "tests/FSharp.Control.AsyncSeq.Tests"
73+
Configuration = "Release"
74+
TimeOut = TimeSpan.FromMinutes 20. })
75+
finally
76+
AppVeyor.UploadTestResultsXml AppVeyor.TestResultsType.NUnit "bin"
11477
)
11578

11679
// --------------------------------------------------------------------------------------
11780
// Build a NuGet package
11881

11982
Target "NuGet" (fun _ ->
120-
Paket.Pack(fun p ->
83+
(*
84+
Paket.Pack(fun p ->
12185
{ p with
12286
Version = release.NugetVersion
123-
ReleaseNotes = toLines release.Notes})
87+
ReleaseNotes = toLines release.Notes })
88+
*)
89+
DotNetCli.Pack (fun p ->
90+
{ p with
91+
Project = project
92+
Configuration = "Release"
93+
VersionSuffix = buildVersion
94+
OutputPath = buildDir
95+
AdditionalArgs =
96+
[ "--no-build"
97+
//"/p:ReleaseNotes=" + (toLines release.Notes)
98+
]
99+
})
124100
)
125101

126102
Target "PublishNuget" (fun _ ->
127-
Paket.Push(fun p ->
103+
Paket.Push(fun p ->
128104
{ p with
129-
WorkingDir = "temp" })
105+
WorkingDir = "temp" })
130106
)
131107

132108
// --------------------------------------------------------------------------------------
@@ -275,13 +251,12 @@ Target "BuildPackage" DoNothing
275251
Target "All" DoNothing
276252

277253
"Clean"
278-
==> "AssemblyInfo"
279254
==> "Build"
280255
==> "RunTests"
281-
=?> ("GenerateReferenceDocs",isLocalBuild)
282-
=?> ("GenerateDocs",isLocalBuild)
256+
=?> ("GenerateReferenceDocs",isLocalBuild && not isMono)
257+
=?> ("GenerateDocs",isLocalBuild && not isMono)
283258
==> "All"
284-
=?> ("ReleaseDocs",isLocalBuild)
259+
=?> ("ReleaseDocs",isLocalBuild && not isMono)
285260

286261
"All"
287262
==> "NuGet"

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
3+
24
if test "$OS" = "Windows_NT"
35
then
46
# use .Net

paket.dependencies

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ group Build
1111
group Test
1212
source https://api.nuget.org/v3/index.json
1313

14+
nuget Microsoft.NET.Test.Sdk
1415
nuget NUnit
1516
nuget NUnit.Runners
1617
nuget NUnit3TestAdapter

0 commit comments

Comments
 (0)