Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: dotnet sdk and TPSDK updates for netstandard2.0 #91

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ $RECYCLE.BIN/
# NuGet Packages Directory
packages/
paket-files/
.paket

# Generated documentation folder
docs/output/
Expand Down
299 changes: 299 additions & 0 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

Binary file modified .paket/paket.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
language: csharp

matrix:
include:
- dotnet: 2.1.300
mono: 5.12.0


sudo: false # use the new container-based Travis infrastructure

script:
Expand Down
22 changes: 21 additions & 1 deletion FSharp.Management.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@
<copyright>Copyright 2016</copyright>
<tags>@tags@</tags>
<iconUrl>https://raw.githubusercontent.com/fsprojects/FSharp.Management/master/docs/files/img/logo.png</iconUrl>
<dependencies />
<dependencies>
<group targetFramework="net45">
<dependency id="FSharp.Core" version="4.0.0.1"/>
</group>
<group targetFramework="netstandard2.0">
<dependency id="FSharp.Core" version="4.3.4" />
</group>
</dependencies>
<references>
<reference file="FSharp.Management.dll" />
</references>
</metadata>
<files>
<!-- Place the TPRTCs in the usual locations -->
<file src="..\nuget\lib\net45\FSharp.Management.dll" target="lib/net45" />
<file src="..\nuget\lib\net45\FSharp.Management.pdb" target="lib/net45" />
<file src="..\nuget\lib\net45\FSharp.Management.xml" target="lib/net45" />
<file src="..\nuget\lib\netstandard2.0\FSharp.Management.dll" target="lib/netstandard2.0" />
<file src="..\nuget\lib\netstandard2.0\FSharp.Management.pdb" target="lib/netstandard2.0" />
<file src="..\nuget\lib\netstandard2.0\FSharp.Management.xml" target="lib/netstandard2.0" />
<file src="..\nuget\docs\*.*" target="docs" />
</files>
</package>
20 changes: 1 addition & 19 deletions FSharp.Management.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Expand All @@ -8,8 +8,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{B2E659
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Management", "src\FSharp.Management\FSharp.Management.fsproj", "{7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
Expand All @@ -36,14 +34,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D
docs\content\WMIProvider.fsx = docs\content\WMIProvider.fsx
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Management.PowerShell.ExternalRuntime", "src\FSharp.Management.PowerShell.ExternalRuntime\FSharp.Management.PowerShell.ExternalRuntime.fsproj", "{282940BD-C7BE-4F1A-BF91-19E591ED7BD7}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Management.WMI", "src\FSharp.Management.WMI\FSharp.Management.WMI.fsproj", "{1D29693F-C472-4B03-A8CE-73CA0689012B}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Management.WMI.DesignTime", "src\FSharp.Management.WMI.DesignTime\FSharp.Management.WMI.DesignTime.fsproj", "{743C0C7B-79DA-44CC-9CB4-F3B25A5B0F08}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Management.PowerShell", "src\FSharp.Management.PowerShell\FSharp.Management.PowerShell.fsproj", "{04EE2403-5410-4CA5-AE4F-99015F1AB105}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -54,10 +48,6 @@ Global
{7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Release|Any CPU.Build.0 = Release|Any CPU
{282940BD-C7BE-4F1A-BF91-19E591ED7BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{282940BD-C7BE-4F1A-BF91-19E591ED7BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{282940BD-C7BE-4F1A-BF91-19E591ED7BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{282940BD-C7BE-4F1A-BF91-19E591ED7BD7}.Release|Any CPU.Build.0 = Release|Any CPU
{1D29693F-C472-4B03-A8CE-73CA0689012B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D29693F-C472-4B03-A8CE-73CA0689012B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D29693F-C472-4B03-A8CE-73CA0689012B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -66,16 +56,8 @@ Global
{743C0C7B-79DA-44CC-9CB4-F3B25A5B0F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{743C0C7B-79DA-44CC-9CB4-F3B25A5B0F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{743C0C7B-79DA-44CC-9CB4-F3B25A5B0F08}.Release|Any CPU.Build.0 = Release|Any CPU
{04EE2403-5410-4CA5-AE4F-99015F1AB105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04EE2403-5410-4CA5-AE4F-99015F1AB105}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04EE2403-5410-4CA5-AE4F-99015F1AB105}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04EE2403-5410-4CA5-AE4F-99015F1AB105}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
{8E6D5255-776D-4B61-85F9-73C37AA1FB9A} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
image: Visual Studio 2017

init:
- git config --global core.autocrlf input

build_script:
- cmd: build.cmd

test: off

version: 0.0.1.{build}

artifacts:
- path: bin
name: bin
28 changes: 12 additions & 16 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#r @"packages/build/FAKE/tools/FakeLib.dll"
open Fake
open Fake.Git
open Fake.DotNet
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open Fake.Testing.Expecto
Expand All @@ -30,7 +31,7 @@ let tags = "F# fsharp typeproviders Management PowerShell"

let solutionFile = "FSharp.Management"

let testAssemblies = "tests/**/bin/Release/*.Tests*.exe"
let testAssemblies = "tests/**/bin/Release/**/*.Tests*.exe"
let gitHome = "https://github.com/fsprojects"
let gitName = "FSharp.Management"
let cloneUrl = "https://github.com/fsprojects/FSharp.Management.git"
Expand Down Expand Up @@ -66,16 +67,14 @@ Target "CleanDocs" (fun _ ->
// --------------------------------------------------------------------------------------
// Build library & test project

let withConfiguration config (bp: DotNet.BuildOptions) = { bp with Configuration = config }

Target "Build" (fun _ ->
!! (solutionFile + ".sln")
|> MSBuildRelease "" "Rebuild"
|> ignore
DotNet.build (withConfiguration DotNet.BuildConfiguration.Release) (solutionFile + ".sln")
)

Target "BuildTests" (fun _ ->
!! (solutionFile + ".Tests.sln")
|> MSBuildRelease "" "Rebuild"
|> ignore
DotNet.build (withConfiguration DotNet.BuildConfiguration.Release) (solutionFile + ".Tests.sln")
)

// --------------------------------------------------------------------------------------
Expand All @@ -89,7 +88,6 @@ Target "RunTests" (fun _ ->
|> ignore
)


// --------------------------------------------------------------------------------------
// Build a NuGet package

Expand All @@ -101,13 +99,14 @@ Target "NuGet" (fun _ ->
let project = projects.[0]

let nugetDocsDir = nugetDir @@ "docs"
let nugetlibDir = nugetDir @@ "lib/net40"
let nugetlib45Dir = nugetDir @@ "lib/net45"
let nugetlibns20Dir = nugetDir @@ "lib/netstandard2.0"

CleanDir nugetDocsDir
CleanDir nugetlibDir
CleanDirs [nugetDocsDir; nugetlib45Dir; nugetlibns20Dir]

CopyDir nugetlibDir "bin" (fun file -> file.Contains "FSharp.Core." |> not)
CopyDir nugetDocsDir "./docs/output" allFiles
CopyDir nugetlib45Dir "src/FSharp.Management/bin/Release/net462" (fun _ -> true)
CopyDir nugetlibns20Dir "src/FSharp.Management/bin/Release/netstandard2.0" (fun _ -> true)
//CopyDir nugetDocsDir "./docs/output" allFiles

NuGet (fun p ->
{ p with
Expand Down Expand Up @@ -255,11 +254,8 @@ Target "All" DoNothing
"Clean"
==> "AssemblyInfo"
==> "Build"
#if MONO
#else
==> "BuildTests"
==> "RunTests"
#endif
==> "All"

"All"
Expand Down
35 changes: 35 additions & 0 deletions netfx.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>

<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>

<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.5</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>

<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>

</PropertyGroup>
<ItemGroup>
<!-- When using 'dotnet build' to compile against Mono reference assemblies it seems necessary to add some explicit references to some facade DLLs -->
<Reference Include="System.Runtime" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />
<Reference Include="System.IO" Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND $(TargetFramework.StartsWith('net4'))" />

</ItemGroup>
</Project>
19 changes: 14 additions & 5 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
source https://nuget.org/api/v2
storage: none
framework: net462, netstandard2.0

nuget FSharp.Core ~> 3
nuget FSharp.Core ~> 4.3.0
nuget System.ServiceModel.Primitives
nuget System.Management.Automation_PowerShell_3.0
nuget Microsoft.Win32.Registry prerelease
nuget System.Management ~> 4.5

github fsprojects/FSharp.TypeProviders.StarterPack src/ProvidedTypes.fsi
github fsprojects/FSharp.TypeProviders.StarterPack src/ProvidedTypes.fs
github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi
github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs

group Test
storage: none
source https://nuget.org/api/v2
framework: net461
framework: net462, netcoreapp2.0

nuget Expecto redirects:force
nuget FSharp.Core ~> 4.3.0
nuget Expecto
nuget System.Management ~> 4.5

group Build
source https://nuget.org/api/v2
framework: net461

nuget FSharp.Core ~> 4.3.0
nuget SourceLink.Fake
nuget FAKE
nuget FSharp.Formatting
Expand Down
Loading