Skip to content

Commit 95a87fe

Browse files
committed
Use only one SDK (3.1)
1 parent 30a4d75 commit 95a87fe

File tree

12 files changed

+36
-44
lines changed

12 files changed

+36
-44
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,17 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [windows-latest, macOS-latest, ubuntu-latest]
18+
dotnet: [3.1.100]
1819
runs-on: ${{ matrix.os }}
1920

2021
steps:
2122
- uses: actions/checkout@v1
2223

23-
- name: Setup .net core 2.1
24-
uses: actions/setup-dotnet@v1
24+
- name: Setup .NET Core
25+
# Fix for https://github.com/actions/setup-dotnet/issues/29#issuecomment-548740241
26+
uses: actions/setup-dotnet@bb95ce727fd49ec1a65933419cc7c91747785302
2527
with:
26-
dotnet-version: 2.1.403
27-
28-
- name: Setup .net core 3.1
29-
uses: actions/setup-dotnet@v1
30-
with:
31-
dotnet-version: 3.1.100
32-
33-
# Workaround for multiple version installation https://github.com/actions/setup-dotnet/issues/25#issuecomment-557570168
34-
- name: .net SxS
35-
if: matrix.os != 'windows-latest'
36-
run: |
37-
rsync -a ${DOTNET_ROOT/3.1.100/2.1.403}/* $DOTNET_ROOT/
28+
dotnet-version: ${{ matrix.dotnet }}
3829

3930
- name: Build on Windows
4031
if: matrix.os == 'windows-latest'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Here is a guide to the steps to perform:
133133

134134
* If the compile-time computations performed by your TPDTC **fundamentally** depend on .NET Framework, then your type provider will not be usable with the .NET SDK toolchain without using [the workaround](https://github.com/Microsoft/visualfsharp/issues/3303))
135135

136-
* If the TPDTC **partially** depends on .NET Framework, then multi-target the TPDTC to `net45;netcoreapp2.0` and use `#if NETCOREAPP2_0`
136+
* If the TPDTC **partially** depends on .NET Framework, then multi-target the TPDTC to `net45;netcoreapp2.0` and use `#if NETCOREAPP3_1`
137137

138138
* If the TPDTC **doesn't** depend on .NET Framework, then target the TPDTC to `netstandard2.0`
139139

build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Target.create "RunTests" (fun _ ->
9191
DotNet.build (fun p -> {setParams p with Framework=Some "net461"}) fsproj
9292
runXUnitRunner fsproj
9393

94-
DotNet.test (setTestOptions "netcoreapp2.0") fsproj
94+
DotNet.test (setTestOptions "netcoreapp3.1") fsproj
9595
)
9696

9797
// This can also be used to give console output:

examples/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\netfx.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net45</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net45</TargetFrameworks>
55
<DefineConstants>NO_GENERATIVE</DefineConstants>
66
<DefineConstants>IS_DESIGNTIME</DefineConstants>
77
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

examples/BasicProvider.Tests/BasicProvider.Tests.fsproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\netfx.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<DefineConstants>NO_GENERATIVE</DefineConstants>
77
</PropertyGroup>
@@ -10,15 +10,15 @@
1010
<Link>ProvidedTypesTesting.fs</Link>
1111
</Compile>
1212
<Compile Include="BasicProvider.Tests.fs" />
13-
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.0' " />
13+
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp3.1' " />
1414

1515
<None Include="xunit.runner.json">
1616
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1717
</None>
1818

19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170517-02" />
20-
<PackageReference Include="xunit" Version="2.2.0" />
21-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
20+
<PackageReference Include="xunit" Version="2.4.1" />
21+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
2222

2323
<!-- When using the type provider, the reference is to the appropriate runtime DLL -->
2424
<ProjectReference Include="..\BasicProvider\BasicProvider.fsproj" />

examples/BasicProvider/BasicProvider.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<Target Name="AfterBuild">
2626
<!-- Note: BasicProvider.DesignTime.fsproj must have been built before this project -->
2727

28-
<!-- We place EACH of the net45, netcoreapp2.0 and netstandard2.0 design-time DLLs in well-known locations with resepct to the runtime DLL -->
29-
<!-- This enables any runtime DLL to be used with any host tooling running in either netcoreapp2.0+ or net45+ -->
28+
<!-- We place EACH of the net45, netcoreapp3.1 and netstandard2.0 design-time DLLs in well-known locations with resepct to the runtime DLL -->
29+
<!-- This enables any runtime DLL to be used with any host tooling running in either netcoreapp3.1+ or net45+ -->
3030
<Copy SourceFiles="..\BasicProvider.DesignTime\bin\$(Configuration)\net45\BasicProvider.DesignTime.dll" DestinationFolder="$(OutputPath)\typeproviders\fsharp41\net45" />
31-
<Copy SourceFiles="..\BasicProvider.DesignTime\bin\$(Configuration)\netcoreapp2.0\BasicProvider.DesignTime.dll" DestinationFolder="$(OutputPath)\typeproviders\fsharp41\netcoreapp2.0" />
31+
<Copy SourceFiles="..\BasicProvider.DesignTime\bin\$(Configuration)\netcoreapp3.1\BasicProvider.DesignTime.dll" DestinationFolder="$(OutputPath)\typeproviders\fsharp41\netcoreapp3.1" />
3232
<Copy SourceFiles="..\BasicProvider.DesignTime\bin\$(Configuration)\netstandard2.0\BasicProvider.DesignTime.dll" DestinationFolder="$(OutputPath)\typeproviders\fsharp41\netstandard2.0" />
3333

3434
<!-- We also place the net45 design-time DLLs alongside the runtime DLL for loading by legacy F# toolchains -->

examples/ComboProvider.Tests/ComboProvider.Tests.fsproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\netfx.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<DefineConstants>NO_GENERATIVE</DefineConstants>
77
</PropertyGroup>
88
<ItemGroup>
99
<Compile Include="ComboProvider.Tests.fs" />
10-
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.0' " />
10+
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp3.1' " />
1111
<None Include="xunit.runner.json">
1212
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1313
</None>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170517-02" />
15-
<PackageReference Include="xunit" Version="2.2.0" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
15+
<PackageReference Include="xunit" Version="2.4.1" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
1717
<ProjectReference Include="..\ComboProvider\ComboProvider.fsproj" />
1818

1919
</ItemGroup>
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\netfx.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<DefineConstants>NO_GENERATIVE</DefineConstants>
77
</PropertyGroup>
88
<ItemGroup>
99
<Compile Include="File1.fs" />
1010
<Compile Include="StressProvider.Tests.fs" />
11-
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.0' " />
11+
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp3.1' " />
1212
<None Include="xunit.runner.json">
1313
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1414
</None>
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170517-02" />
16-
<PackageReference Include="xunit" Version="2.2.0" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
16+
<PackageReference Include="xunit" Version="2.4.1" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
1818
<ProjectReference Include="..\StressProvider\StressProvider.fsproj" />
19-
2019
</ItemGroup>
2120
</Project>

src/ProvidedTypesTesting.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ module internal Targets =
658658
| "4.1", "netstandard1.6" -> None
659659
| "4.1", "netstandard2.0" -> None
660660
| "4.1", "netcoreapp2.0" -> None
661+
| "4.1", "netcoreapp3.1" -> None
661662
| _ -> failwith (sprintf "unimplemented profile, fsharpVersion = %s, profile = %s" fsharp profile)
662663

663664

@@ -685,6 +686,7 @@ module internal Targets =
685686
| "netstandard2.1" -> [ "netstandard2.1"; "netstandard2.0"; "netstandard1.6" ]
686687
| "netcoreapp2.0" -> [ "netcoreapp2.0"; "netstandard2.0"; "netstandard1.6" ]
687688
| "netcoreapp2.1" -> [ "netcoreapp2.1"; "netcoreapp2.0"; "netstandard2.0"; "netstandard1.6" ]
689+
| "netcoreapp3.1" -> [ "netcoreapp3.1"; "netcoreapp2.1"; "netcoreapp2.0"; "netstandard2.0"; "netstandard1.6" ]
688690
| "portable47" -> ["portable-net45+sl5+netcore45"]
689691
| "portable7" -> ["portable-net45+netcore45"]
690692
| "portable78" -> ["portable-net45+netcore45+wp8"]

tests/BasicErasedProvisionTests.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type ErasingProvider (config : TypeProviderConfig, hasBigInt: bool) as this =
3939
// See bug https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues/236
4040
#if NETCOREAPP
4141
let genTy = typedefof<list<_>>
42-
// The next line loops on netcoreapp2.0 when the ProvidedTypes.fs is compiled as netstandard2.0 (without NETCOREAPP defined)
42+
// The next line loops on netcoreapp3.1 when the ProvidedTypes.fs is compiled as netstandard2.0 (without NETCOREAPP defined)
4343
let instTy = genTy.MakeGenericType(myType)
4444
let fails = instTy.FullName
4545
#endif
@@ -459,7 +459,7 @@ let ``test basic binding context portable259``() =
459459
printfn "-======================="
460460
| Choice2Of2 err -> raise err
461461

462-
#if !NETCOREAPP2_0
462+
#if !NETCOREAPP3_1
463463
[<Fact>]
464464
let ``test trasitive closure of source assemblies net45``() =
465465
let pf = Targets.DotNet45Ref "PresentationFramework.dll"

0 commit comments

Comments
 (0)