Skip to content

Commit d070d17

Browse files
authored
Netcoreapp3 (#7359)
* Use netcoresdk 3.0 * Use appdomain and load context * temp * Execute in appdomain, or assemblyloadcontext * fscore * linux * Try to publish test logs from Linux/MacOS * Copy paste error * netcoreapp3 * feedback
1 parent 5f35d4e commit d070d17

File tree

21 files changed

+141
-167
lines changed

21 files changed

+141
-167
lines changed

NuGet.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
<add key="vs-impl" value="https://vside.myget.org/F/vs-impl/api/v3/index.json" />
2323
<add key="roslyn_concord" value="https://myget.org/F/roslyn_concord/api/v3/index.json" />
2424
<add key="devcore" value="https://vside.myget.org/F/devcore/api/v3/index.json" />
25+
26+
<!-- These keys can be removed once 16.3 has shipped, they are necessary to build with net16.3 previews -->
27+
<add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
28+
<add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
29+
<add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
30+
<add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
31+
<add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
32+
<add key="gRPC repository" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
2533
</packageSources>
2634
<disabledPackageSources>
2735
<clear />

eng/Build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function BuildSolution() {
174174
$officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
175175
$toolsetBuildProj = InitializeToolset
176176
$quietRestore = !$ci
177-
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
177+
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp3.0" } else { "" }
178178

179179
# Do not set the property to true explicitly, since that would override value projects might set.
180180
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
@@ -309,7 +309,7 @@ try {
309309
Prepare-TempDir
310310
EnablePreviewSdks
311311

312-
# enable us to build netcoreapp2.1 binaries
312+
# enable us to build netcoreapp2.1 product binaries
313313
$global:_DotNetInstallDir = Join-Path $RepoRoot ".dotnet"
314314
InstallDotNetSdk $global:_DotNetInstallDir $GlobalJson.tools.dotnet
315315
InstallDotNetSdk $global:_DotNetInstallDir "2.1.503"
@@ -332,7 +332,7 @@ try {
332332
}
333333

334334
$desktopTargetFramework = "net472"
335-
$coreclrTargetFramework = "netcoreapp2.1"
335+
$coreclrTargetFramework = "netcoreapp3.0"
336336

337337
if ($testDesktop -and -not $noVisualStudio) {
338338
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework

eng/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ InstallDotNetSdk $_InitializeDotNetCli 2.1.503
269269
BuildSolution
270270

271271
if [[ "$test_core_clr" == true ]]; then
272-
coreclrtestframework=netcoreapp2.1
272+
coreclrtestframework=netcoreapp3.0
273273
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
274274
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj" --targetframework $coreclrtestframework
275275
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework

src/fsharp/FSharp.Compiler.LanguageServer/FSharp.Compiler.LanguageServer.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
66
<TargetExt>.exe</TargetExt>
7-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
7+
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
8+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.0</TargetFrameworks>
99
<IsPackable>true</IsPackable>
1010
<PackageDescription>Implements the Language Server Protocol (LSP) for F#.</PackageDescription>
1111
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>

tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Project Sdk="Microsoft.NET.Sdk">
44

55
<PropertyGroup>
6-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
7-
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
6+
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.0</TargetFrameworks>
88
<OutputType>Library</OutputType>
99
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
1010
<UnitTestType>nunit</UnitTestType>

tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
6-
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
6+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.0</TargetFrameworks>
77
<OutputType>Library</OutputType>
88
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
99
<UnitTestType>nunit</UnitTestType>

tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Project Sdk="Microsoft.NET.Sdk">
44

55
<PropertyGroup>
6-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
7-
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
6+
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.0</TargetFrameworks>
88
<OutputType>Library</OutputType>
99
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
1010
<UnitTestType>nunit</UnitTestType>

tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Project Sdk="Microsoft.NET.Sdk">
44

55
<PropertyGroup>
6-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
7-
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
6+
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.0</TargetFrameworks>
88
<OutputType>Library</OutputType>
99

1010
<AssemblyName>FSharp.Core.UnitTests</AssemblyName>

tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,35 +94,22 @@ type ListModule02() =
9494

9595
// string List
9696
let funcStr x y z = x + y + z
97-
let resultStr = List.map3 funcStr ["A";"B";"C";"D"] ["a";"b";"c";"d"] ["1";"2";"3";"4"]
97+
let resultStr = List.map3 funcStr ["A";"B";"C";"D"] ["a";"b";"c";"d"] ["1";"2";"3";"4"]
9898
Assert.AreEqual(["Aa1";"Bb2";"Cc3";"Dd4"], resultStr)
99-
99+
100100
// lists of different length
101101
let shortList = [1]
102102
let longerList = [1; 2]
103103
CheckThrowsArgumentException (fun () -> List.map3 funcInt shortList shortList longerList |> ignore)
104104
CheckThrowsArgumentException (fun () -> List.map3 funcInt shortList longerList shortList |> ignore)
105105
CheckThrowsArgumentException (fun () -> List.map3 funcInt shortList shortList longerList |> ignore)
106-
107-
// exception message checking
108-
let expectedMessage =
109-
"The lists had different lengths.\n" +
110-
sprintf " list1.Length = %i, list2.Length = %i, list3.Length = %i" shortList.Length shortList.Length longerList.Length +
111-
Environment.NewLine + "Parameter name: list1, list2, list3"
112-
let ex = Assert.Throws(typeof<ArgumentException>,
113-
(fun () -> List.map3 funcInt shortList shortList longerList |> ignore))
114-
Assert.AreEqual(expectedMessage, ex.Message)
115106

116107
// empty List
117108
let resultEpt = List.map3 funcInt List.empty List.empty List.empty
118109
Assert.AreEqual(List.empty<int>, resultEpt)
119-
120-
()
121-
122110

123111
[<Test>]
124-
member this.Collect() =
125-
// integer List
112+
member this.Collect() = // integer List
126113
let funcInt x =
127114
match x with
128115
| _ when x % 3 = 0 -> [999;999]

tests/FSharp.Core.UnitTests/NUnitFrameworkShims.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ namespace NUnit.Framework
55
open System
66
open System.Collections.Generic
77
open System.Linq
8-
98
#if XUNIT
109
open Xunit
1110

12-
(* The threading tests under XUnit seem prone to be verey Flakey *)
11+
(* The threading tests under XUnit seem prone to be very Flakey *)
1312
[<assembly: Xunit.CollectionBehavior(DisableTestParallelization = true)>]
1413
do ()
1514

0 commit comments

Comments
 (0)