diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props
index 098235215c..9d9983693a 100644
--- a/FSharpTests.Directory.Build.props
+++ b/FSharpTests.Directory.Build.props
@@ -22,18 +22,18 @@
$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
dotnet.exe
dotnet
- $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\netcoreapp3.1\fsc.dll
+ $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net5.0\fsc.dll
$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
dotnet.exe
dotnet
- $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\netcoreapp3.1\fsi.dll
+ $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net5.0\fsi.dll
<_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472
- <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">netcoreapp3.1
+ <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net5.0
<_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework)
$(_FSharpBuildBinPath)\FSharp.Build.dll
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 22cc0b32ef..37979ac6b9 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -56,8 +56,6 @@ variables:
value: .NETCore
- name: VisualStudioDropName
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
- - name: LegacyDotNetSdkVersion
- value: 3.1.405
- name: DotNetSdkVersion
value: '5.0.100'
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
@@ -105,12 +103,6 @@ stages:
steps:
- checkout: self
clean: true
- - task: UseDotNet@2
- displayName: Add legacy .NET SDK
- inputs:
- packageType: sdk
- version: $(LegacyDotNetSdkVersion)
- installationPath: $(Agent.ToolsDirectory)/dotnet
- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
@@ -219,12 +211,6 @@ stages:
steps:
- checkout: self
clean: true
- - task: UseDotNet@2
- displayName: Add legacy .NET SDK
- inputs:
- packageType: sdk
- version: $(LegacyDotNetSdkVersion)
- installationPath: $(Agent.ToolsDirectory)/dotnet
- script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind)
displayName: Build / Test
- task: PublishTestResults@2
@@ -275,12 +261,6 @@ stages:
steps:
- checkout: self
clean: true
- - task: UseDotNet@2
- displayName: Add legacy .NET SDK
- inputs:
- packageType: sdk
- version: $(LegacyDotNetSdkVersion)
- installationPath: $(Agent.ToolsDirectory)/dotnet
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
displayName: Build / Test
- task: PublishTestResults@2
@@ -313,12 +293,6 @@ stages:
steps:
- checkout: self
clean: true
- - task: UseDotNet@2
- displayName: Add legacy .NET SDK
- inputs:
- packageType: sdk
- version: $(LegacyDotNetSdkVersion)
- installationPath: $(Agent.ToolsDirectory)/dotnet
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
displayName: Build / Test
- task: PublishTestResults@2
diff --git a/docs/fsharp-core-notes.md b/docs/fsharp-core-notes.md
index e98354bd18..e1ad8380c8 100644
--- a/docs/fsharp-core-notes.md
+++ b/docs/fsharp-core-notes.md
@@ -52,7 +52,7 @@ For modern templates, this is the default. For older templates, you may need to
FSharp.Core.dll will normally appear in the `bin` output folder for your application. For example:
```
- Directory of ...\ConsoleApplication3\bin\Debug\netcoreapp3.1
+ Directory of ...\ConsoleApplication3\bin\Debug\net5.0
18/04/2020 13:20 5,632 ConsoleApplication3.exe
14/10/2020 12:12 1,400,472 FSharp.Core.dll
diff --git a/eng/Build.ps1 b/eng/Build.ps1
index 3bec8cdb2e..9a97f5a93f 100644
--- a/eng/Build.ps1
+++ b/eng/Build.ps1
@@ -177,11 +177,11 @@ function Process-Arguments() {
function Update-Arguments() {
if ($script:noVisualStudio) {
- $script:bootstrapTfm = "netcoreapp3.1"
+ $script:bootstrapTfm = "net5.0"
$script:msbuildEngine = "dotnet"
}
- if ($bootstrapTfm -eq "netcoreapp3.1") {
+ if ($bootstrapTfm -eq "net5.0") {
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
$script:bootstrap = $True
}
@@ -201,7 +201,7 @@ function BuildSolution([string] $solutionName) {
$officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci
- $testTargetFrameworks = if ($testCoreClr) { "netcoreapp3.1" } else { "" }
+ $testTargetFrameworks = if ($testCoreClr) { "net5.0" } else { "" }
# Do not set the property to true explicitly, since that would override value projects might set.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
@@ -437,6 +437,11 @@ try {
$buildTool = InitializeBuildTool
$toolsetBuildProj = InitializeToolset
TryDownloadDotnetFrameworkSdk
+
+ $dotnetPath = InitializeDotNetCli
+ $env:DOTNET_ROOT="$dotnetPath"
+ Get-Item -Path Env:
+
if ($bootstrap) {
$script:BuildMessage = "Failure building bootstrap compiler"
$bootstrapDir = Make-BootstrapBuild
@@ -458,7 +463,7 @@ try {
$script:BuildCategory = "Test"
$script:BuildMessage = "Failure running tests"
$desktopTargetFramework = "net472"
- $coreclrTargetFramework = "netcoreapp3.1"
+ $coreclrTargetFramework = "net5.0"
if ($testDesktop) {
TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
diff --git a/eng/DumpPackageRoot/DumpPackageRoot.csproj b/eng/DumpPackageRoot/DumpPackageRoot.csproj
index c3b2cedf8f..0c94f0a999 100644
--- a/eng/DumpPackageRoot/DumpPackageRoot.csproj
+++ b/eng/DumpPackageRoot/DumpPackageRoot.csproj
@@ -3,7 +3,7 @@
- netcoreapp3.1
+ net5.0
diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1
index c601896faf..ffc4498fb8 100644
--- a/eng/build-utils.ps1
+++ b/eng/build-utils.ps1
@@ -244,16 +244,16 @@ function Make-BootstrapBuild() {
$argNoRestore = if ($norestore) { " --no-restore" } else { "" }
$argNoIncremental = if ($rebuild) { " --no-incremental" } else { "" }
- $args = "build $buildToolsProject -c $bootstrapConfiguration -v $verbosity -f netcoreapp3.1" + $argNoRestore + $argNoIncremental
+ $args = "build $buildToolsProject -c $bootstrapConfiguration -v $verbosity" + $argNoRestore + $argNoIncremental
if ($binaryLog) {
$logFilePath = Join-Path $LogDir "toolsBootstrapLog.binlog"
$args += " /bl:$logFilePath"
}
Exec-Console $dotnetExe $args
- Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\fslex" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\fsyacc" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\AssemblyCheck" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net5.0" -Destination "$dir\fslex" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net5.0" -Destination "$dir\fsyacc" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net5.0" -Destination "$dir\AssemblyCheck" -Force -Recurse
# prepare compiler
$protoProject = "`"$RepoRoot\proto.proj`""
diff --git a/eng/build.sh b/eng/build.sh
index e741ff8549..11536de910 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -247,8 +247,8 @@ function BuildSolution {
/p:Configuration=$bootstrap_config
mkdir -p "$bootstrap_dir"
- cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/netcoreapp3.1 $bootstrap_dir/fslex
- cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/netcoreapp3.1 $bootstrap_dir/fsyacc
+ cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net5.0 $bootstrap_dir/fslex
+ cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net5.0 $bootstrap_dir/fsyacc
fi
if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
BuildMessage="Error building bootstrap"
@@ -257,7 +257,7 @@ function BuildSolution {
/p:Configuration=$bootstrap_config \
- cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/netcoreapp3.1 $bootstrap_dir/fsc
+ cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net5.0 $bootstrap_dir/fsc
fi
# do real build
@@ -297,7 +297,7 @@ InitializeDotNetCli $restore
BuildSolution
if [[ "$test_core_clr" == true ]]; then
- coreclrtestframework=netcoreapp3.1
+ coreclrtestframework=net5.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj" --targetframework $coreclrtestframework --notestfilter
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
diff --git a/fcs-samples/EditorService/EditorService.fsproj b/fcs-samples/EditorService/EditorService.fsproj
index 5ce569ffaa..27bdbef249 100644
--- a/fcs-samples/EditorService/EditorService.fsproj
+++ b/fcs-samples/EditorService/EditorService.fsproj
@@ -1,7 +1,7 @@
- $(FcsTargetNetFxFramework);netcoreapp3.1
+ $(FcsTargetNetFxFramework);net5.0
true
Exe
false
diff --git a/proto.proj b/proto.proj
index bb2f972704..bb07783455 100644
--- a/proto.proj
+++ b/proto.proj
@@ -10,10 +10,10 @@
TargetFramework=netstandard2.0
- TargetFramework=netcoreapp3.1
+ TargetFramework=net5.0
- TargetFramework=netcoreapp3.1
+ TargetFramework=net5.0
diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
index be43696d78..464b6ef78c 100644
--- a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
+++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ net5.0
true
diff --git a/src/buildtools/fslex/fslex.fsproj b/src/buildtools/fslex/fslex.fsproj
index da7c52ba13..1959ce59c0 100644
--- a/src/buildtools/fslex/fslex.fsproj
+++ b/src/buildtools/fslex/fslex.fsproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ net5.0
INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)
true
diff --git a/src/buildtools/fsyacc/fsyacc.fsproj b/src/buildtools/fsyacc/fsyacc.fsproj
index a2b8cb3844..5d1b7141f4 100644
--- a/src/buildtools/fsyacc/fsyacc.fsproj
+++ b/src/buildtools/fsyacc/fsyacc.fsproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ net5.0
INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)
true
diff --git a/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs b/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
index e7ced25962..3b1d6da172 100644
--- a/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
+++ b/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
@@ -127,7 +127,7 @@ module internal Utilities =
// In an sdk install we are always installed in: sdk\3.0.100-rc2-014234\FSharp
// dotnet or dotnet.exe will be found in the directory that contains the sdk directory
// 3. We are loaded in-process to some other application ... Eg. try .net
- // See if the host is dotnet.exe ... from netcoreapp3.1 on this is fairly unlikely
+ // See if the host is dotnet.exe ... from net5.0 on this is fairly unlikely
// 4. If it's none of the above we are going to have to rely on the path containing the way to find dotnet.exe
//
if isRunningOnCoreClr then
diff --git a/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj b/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj
index e75296aa72..26620118b4 100644
--- a/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj
+++ b/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj
@@ -2,7 +2,7 @@
true
- netcoreapp3.1
+ net5.0
Microsoft.FSharp.Compiler.nuspec
true
.NET Core compatible version of the F# compiler fsc.exe.
@@ -11,10 +11,10 @@
- TargetFramework=netcoreapp3.1
+ TargetFramework=net5.0
- TargetFramework=netcoreapp3.1
+ TargetFramework=net5.0
TargetFramework=netstandard2.0
diff --git a/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec b/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec
index b98ef8ddd4..8f9f4824dd 100644
--- a/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec
+++ b/src/fsharp/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec
@@ -4,7 +4,7 @@
$CommonMetadataElements$
en-US
-
+
@@ -46,19 +46,19 @@
this approach gives a very small deployment. Which is kind of necessary.
-->
-
-
-
-
-
-
+
+
+
+
+
+
+ target="lib\net5.0" />
+ target="lib\net5.0" />
-
+
@@ -66,13 +66,13 @@
-
+
+ target="lib\net5.0" />
-
+ target="lib\net5.0" />
+
+ target="lib\net5.0" />
diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs
index 20a5456674..bf5f44a387 100644
--- a/src/fsharp/fsc.fs
+++ b/src/fsharp/fsc.fs
@@ -647,11 +647,13 @@ let main1OfAst
let primaryAssembly =
// temporary workaround until https://github.com/dotnet/fsharp/pull/8043 is merged:
- // pick a primary assembly based on the current runtime.
+ // pick a primary assembly based on whether the developer included System>Runtime in the list of reference assemblies.
// It's an ugly compromise used to avoid exposing primaryAssembly in the public api for this function.
- let isNetCoreAppProcess = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.StartsWith ".NET Core"
- if isNetCoreAppProcess then PrimaryAssembly.System_Runtime
- else PrimaryAssembly.Mscorlib
+ let includesSystem_Runtime = dllReferences |> Seq.exists(fun f -> Path.GetFileName(f).Equals("system.runtime.dll",StringComparison.InvariantCultureIgnoreCase))
+ if includesSystem_Runtime then
+ PrimaryAssembly.System_Runtime
+ else
+ PrimaryAssembly.Mscorlib
tcConfigB.target <- target
tcConfigB.primaryAssembly <- primaryAssembly
diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj
index a1c10c3d9c..211415f64e 100644
--- a/src/fsharp/fsc/fsc.fsproj
+++ b/src/fsharp/fsc/fsc.fsproj
@@ -5,8 +5,8 @@
Exe
$(ProtoTargetFramework)
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
$(NoWarn);44;45;55;62;75;1204
true
$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1
diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj
index 332713f0f1..9fd9b1333b 100644
--- a/src/fsharp/fsi/fsi.fsproj
+++ b/src/fsharp/fsi/fsi.fsproj
@@ -5,8 +5,8 @@
Exe
$(ProtoTargetFramework)
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
$(NoWarn);44;45;55;62;75;1204
true
$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1
@@ -46,7 +46,7 @@
-
+
diff --git a/src/fsharp/utils/CompilerLocationUtils.fs b/src/fsharp/utils/CompilerLocationUtils.fs
index c4e44f00ac..04c2720433 100644
--- a/src/fsharp/utils/CompilerLocationUtils.fs
+++ b/src/fsharp/utils/CompilerLocationUtils.fs
@@ -253,7 +253,7 @@ module internal FSharpEnvironment =
if typeof.Assembly.GetName().Name = "mscorlib" then
[| "net48"; "net472"; "net471";"net47";"net462";"net461"; "net452"; "net451"; "net45"; "netstandard2.0" |]
elif typeof.Assembly.GetName().Name = "System.Private.CoreLib" then
- [| "netcoreapp3.1"; "netcoreapp3.0"; "netstandard2.1"; "netcoreapp2.2"; "netcoreapp2.1"; "netcoreapp2.0"; "netstandard2.0" |]
+ [| "net5.0"; "netcoreapp3.1"; "netcoreapp3.0"; "netstandard2.1"; "netcoreapp2.2"; "netcoreapp2.1"; "netcoreapp2.0"; "netstandard2.0" |]
else
System.Diagnostics.Debug.Assert(false, "Couldn't determine runtime tooling context, assuming it supports at least .NET Standard 2.0")
[| "netstandard2.0" |]
diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
index 84caced58f..e027c0f02e 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
@@ -2,7 +2,7 @@
Library
- netcoreapp3.1;net472
+ net5.0;net472
typeproviders
NO_GENERATIVE
IS_DESIGNTIME
diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj
index f6d202a0d5..358a605941 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj
@@ -2,7 +2,7 @@
Library
- netcoreapp3.1
+ net5.0
$(TestTargetFramework)
false
NO_GENERATIVE
diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
index 9e6714f99d..b2125ad9b9 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
@@ -2,7 +2,7 @@
Library
- netcoreapp3.1;net472
+ net5.0;net472
typeproviders
$(FSharpCoreShippedPackageVersion)
typeproviders
diff --git a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd
index bce9551e2c..2abd059cc4 100644
--- a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd
+++ b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd
@@ -42,8 +42,8 @@ echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuratio
dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40
if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure
-echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
- dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
+echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
+ dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure
rem
@@ -60,8 +60,8 @@ echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuratio
dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40
if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure
-echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
- dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
+echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
+ dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure
:success
diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj
index 21a2234258..36c83c024b 100644
--- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj
+++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj
@@ -2,7 +2,7 @@
Library
- netcoreapp3.1
+ net5.0
$(TestTargetFramework)
false
$(FSharpCoreShippedPackageVersion)
diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj
index 0b35bb4aac..640b505aaf 100644
--- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj
+++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj
@@ -2,9 +2,9 @@
Library
- netcoreapp3.1;net472
+ net5.0;net472
$(FSharpCoreShippedPackageVersion)
- netcoreapp3.1;net472
+ net5.0;net472
diff --git a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd
index b8e68e2413..f14f268565 100644
--- a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd
+++ b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd
@@ -42,8 +42,8 @@ echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuratio
dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40
if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure
-echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
- dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
+echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
+ dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure
rem
@@ -60,8 +60,8 @@ echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuratio
dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40
if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure
-echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -v %configuration% -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
- dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr
+echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -v %configuration% -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
+ dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net5.0 -p:FSharpTestCompilerVersion=coreclr
if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure
:success
diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
index ffc6aa91e4..2572d28cc6 100644
--- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
+++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
Library
true
nunit
diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
index 1c8dfc3d38..32b9781dd6 100644
--- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
+++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
@@ -2,8 +2,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
Library
true
false
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
index 03e37a19ef..64b81ae21e 100644
--- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
@@ -88,7 +88,7 @@ type DependencyManagerInteractiveTests() =
Assert.Equal(1, result.SourceFiles |> Seq.length)
Assert.Equal(2, result.Roots |> Seq.length)
- let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "netcoreapp3.1")
+ let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "net5.0")
Assert.Equal(true, result.Success)
Assert.Equal(1, result.Resolutions |> Seq.length)
Assert.Equal(1, result.SourceFiles |> Seq.length)
@@ -110,7 +110,7 @@ type DependencyManagerInteractiveTests() =
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite, 3.1.8"|], reportError, "netcoreapp3.1")
+ let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite, 3.1.8"|], reportError, "net5.0")
Assert.Equal(true, result.Success)
Assert.True((result.Resolutions |> Seq.length) > 1)
Assert.Equal(1, result.SourceFiles |> Seq.length)
@@ -140,7 +140,7 @@ type DependencyManagerInteractiveTests() =
Assert.Equal(0, result.SourceFiles |> Seq.length)
Assert.Equal(0, result.Roots |> Seq.length)
- let result = dp.Resolve(idm, ".fsx", [|"r", "System.Collections.Immutable.DoesNotExist"|], reportError, "netcoreapp3.1")
+ let result = dp.Resolve(idm, ".fsx", [|"r", "System.Collections.Immutable.DoesNotExist"|], reportError, "net5.0")
Assert.Equal(false, result.Success)
Assert.Equal(0, result.Resolutions |> Seq.length)
Assert.Equal(0, result.SourceFiles |> Seq.length)
@@ -173,7 +173,7 @@ type DependencyManagerInteractiveTests() =
Assert.True((result1.Roots |> Seq.head).EndsWith("/fsharp.data/3.3.3/"))
Assert.True((result1.Roots |> Seq.last).EndsWith("/microsoft.netframework.referenceassemblies/1.0.0/"))
- let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "FSharp.Data, 3.3.3"|], reportError, "netcoreapp3.1")
+ let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "FSharp.Data, 3.3.3"|], reportError, "net5.0")
Assert.Equal(true, result2.Success)
Assert.Equal(1, result2.Resolutions |> Seq.length)
let expected2 = "/netstandard2.0/"
@@ -194,7 +194,7 @@ type DependencyManagerInteractiveTests() =
Assert.Equal(1, result3.SourceFiles |> Seq.length)
Assert.True((result3.Roots |> Seq.head).EndsWith("/system.json/4.6.0/"))
- let result4 = dp2.Resolve(idm2, ".fsx", [|"r", "System.Json, Version=4.6.0"|], reportError, "netcoreapp3.1")
+ let result4 = dp2.Resolve(idm2, ".fsx", [|"r", "System.Json, Version=4.6.0"|], reportError, "net5.0")
Assert.Equal(true, result4.Success)
Assert.Equal(1, result4.Resolutions |> Seq.length)
let expected4 = "/netstandard2.0/"
@@ -230,7 +230,7 @@ type DependencyManagerInteractiveTests() =
// Netstandard gets fewer dependencies than desktop, because desktop framework doesn't contain assemblies like System.Memory
// Those assemblies must be delivered by nuget for desktop apps
- let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "Microsoft.Extensions.Configuration.Abstractions, 3.1.1"|], reportError, "netcoreapp3.1")
+ let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "Microsoft.Extensions.Configuration.Abstractions, 3.1.1"|], reportError, "net5.0")
Assert.Equal(true, result2.Success)
Assert.Equal(2, result2.Resolutions |> Seq.length)
let expected = "/netcoreapp3.1/"
@@ -287,7 +287,7 @@ TorchSharp.Tensor.LongTensor.From([| 0L .. 100L |]).Device
let result =
use dp = new DependencyProvider(AssemblyResolutionProbe(assemblyProbingPaths), NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "netcoreapp3.1")
+ dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net5.0")
Assert.True(result.Success, "resolve failed")
@@ -383,7 +383,7 @@ printfn ""%A"" result
let result =
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "netcoreapp3.1")
+ dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net5.0")
Assert.True(result.Success, "resolve failed")
@@ -464,7 +464,7 @@ printfn ""%A"" result
let result =
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "netcoreapp3.1")
+ dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net5.0")
Assert.True(result.Success, "resolve failed")
@@ -521,7 +521,7 @@ x |> Seq.iter(fun r ->
let result =
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "netcoreapp3.1")
+ dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net5.0")
// Expected: error FS3217: PackageManager can not reference the System Package 'FSharp.Core'
Assert.False(result.Success, "resolve succeeded but should have failed")
@@ -547,7 +547,7 @@ x |> Seq.iter(fun r ->
let result =
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- dp.Resolve(idm, ".csx", packagemanagerlines, reportError, "netcoreapp3.1")
+ dp.Resolve(idm, ".csx", packagemanagerlines, reportError, "net5.0")
Assert.True(result.Success, "resolve failed but should have succeeded")
@@ -590,7 +590,7 @@ x |> Seq.iter(fun r ->
Assert.Equal(1, result.SourceFiles |> Seq.length)
Assert.Equal(2, result.Roots |> Seq.length)
- let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "netcoreapp3.1")
+ let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "net5.0")
Assert.Equal(true, result.Success)
Assert.Equal(1, result.Resolutions |> Seq.length)
Assert.Equal(1, result.SourceFiles |> Seq.length)
@@ -697,7 +697,7 @@ x |> Seq.iter(fun r ->
let mutable currentPath:string = null
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite,3.1.7"|], reportError, "netcoreapp3.1")
+ let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite,3.1.7"|], reportError, "net5.0")
Assert.Equal(true, result.Success)
currentPath <- appendSemiColon (Environment.GetEnvironmentVariable("PATH"))
finalPath <- appendSemiColon (Environment.GetEnvironmentVariable("PATH"))
@@ -819,7 +819,7 @@ x |> Seq.iter(fun r ->
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "netcoreapp3.1", timeout=0) // Fail in 0 milliseconds
+ let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "net5.0", timeout=0) // Fail in 0 milliseconds
Assert.Equal(false, result.Success)
Assert.Equal(foundCorrectError, true)
Assert.Equal(foundWrongError, false)
@@ -842,7 +842,7 @@ x |> Seq.iter(fun r ->
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=0"|], reportError, "netcoreapp3.1", null, "", "", "", -1) // Wait forever
+ let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=0"|], reportError, "net5.0", null, "", "", "", -1) // Wait forever
Assert.Equal(false, result.Success)
Assert.Equal(foundCorrectError, true)
Assert.Equal(foundWrongError, false)
@@ -865,7 +865,7 @@ x |> Seq.iter(fun r ->
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
- let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=none"|], reportError, "netcoreapp3.1", null, "", "", "", 0) // Wait forever
+ let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=none"|], reportError, "net5.0", null, "", "", "", 0) // Wait forever
Assert.Equal(true, result.Success)
Assert.Equal(foundCorrectError, false)
Assert.Equal(foundWrongError, false)
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
index dd354231cf..d30dd32729 100644
--- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
@@ -2,8 +2,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
Library
true
xunit
diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
index 089f059db0..ec7f2fa2f8 100644
--- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -2,7 +2,7 @@
Exe
- net472;netcoreapp3.1
+ net472;net5.0
$(NoWarn);44;75;
true
false
diff --git a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj
index 32fa69deec..da19177c3f 100644
--- a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj
+++ b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
Library
true
$(DefineConstants);ASSUME_PREVIEW_FSHARP_CORE
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
index ada7028030..e0d363f10a 100644
--- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
Library
FSharp.Core.UnitTests
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs
index c89f5913c1..7932a9cf98 100644
--- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs
@@ -153,7 +153,7 @@ type AsyncType() =
member this.AsyncSleepInfinitely() =
ignoreSynchCtx (fun () ->
let computation = Async.Sleep(System.Threading.Timeout.Infinite)
- let result = TaskCompletionSource()
+ let result = TaskCompletionSource()
use cts = new CancellationTokenSource(TimeSpan.FromSeconds(1.0)) // there's a long way from 1 sec to infinity, but it'll have to do.
Async.StartWithContinuations(computation,
(fun _ -> result.TrySetResult("Ok") |> ignore),
diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs
index f5eed91ba6..7a0cd20257 100644
--- a/tests/FSharp.Test.Utilities/CompilerAssert.fs
+++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs
@@ -154,7 +154,7 @@ let main argv = 0"""
let directoryBuildTargetsFileName = Path.Combine(projectDirectory, "Directory.Build.targets")
let frameworkReferencesFileName = Path.Combine(projectDirectory, "FrameworkReferences.txt")
#if NETCOREAPP
- File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "netcoreapp3.1").Replace("$FSHARPCORELOCATION", pathToFSharpCore))
+ File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net5.0").Replace("$FSHARPCORELOCATION", pathToFSharpCore))
#else
File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net472").Replace("$FSHARPCORELOCATION", pathToFSharpCore))
#endif
@@ -443,7 +443,7 @@ let main argv = 0"""
let runtimeconfig = """
{
"runtimeOptions": {
- "tfm": "netcoreapp3.1",
+ "tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0"
diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
index 17bc403c69..07250b365a 100644
--- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
+++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
@@ -1,8 +1,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
win-x86;win-x64;linux-x64;osx-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
true
@@ -52,29 +52,29 @@
-
+
-
+
Always
-
+
Always
-
+
Always
-
+
Always
-
+
Always
-
+
Always
-
+
Always
diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs
index 9aa5ea0a40..5025396c22 100644
--- a/tests/FSharp.Test.Utilities/TestFramework.fs
+++ b/tests/FSharp.Test.Utilities/TestFramework.fs
@@ -204,6 +204,8 @@ type TestConfig =
PEVERIFY : string
Directory: string
DotNetExe: string
+ DotNetMultiLevelLookup: string
+ DotNetRoot: string
DefaultPlatform: string}
#if NETCOREAPP
@@ -266,9 +268,9 @@ let config configurationName envVars =
let fsiArchitecture = "net472"
let peverifyArchitecture = "net472"
#else
- let fscArchitecture = "netcoreapp3.1"
- let fsiArchitecture = "netcoreapp3.1"
- let peverifyArchitecture = "netcoreapp3.1"
+ let fscArchitecture = "net5.0"
+ let fsiArchitecture = "net5.0"
+ let peverifyArchitecture = "net5.0"
#endif
let repoRoot = SCRIPT_ROOT ++ ".." ++ ".."
let artifactsPath = repoRoot ++ "artifacts"
@@ -347,29 +349,34 @@ let config configurationName envVars =
vbc_flags = vbc_flags
Directory=""
DotNetExe = dotNetExe
+ DotNetMultiLevelLookup = System.Environment.GetEnvironmentVariable "DOTNET_MULTILEVEL_LOOKUP"
+ DotNetRoot = System.Environment.GetEnvironmentVariable "DOTNET_ROOT"
DefaultPlatform = defaultPlatform }
let logConfig (cfg: TestConfig) =
log "---------------------------------------------------------------"
log "Executables"
log ""
- log "CSC =%s" cfg.CSC
- log "BUILD_CONFIG =%s" cfg.BUILD_CONFIG
- log "csc_flags =%s" cfg.csc_flags
- log "FSC =%s" cfg.FSC
- log "fsc_flags =%s" cfg.fsc_flags
- log "FSCOREDLLPATH =%s" cfg.FSCOREDLLPATH
- log "FSI =%s" cfg.FSI
-#if !NETCOREAPP
- log "FSIANYCPU =%s" cfg.FSIANYCPU
+ log "CSC = %s" cfg.CSC
+ log "BUILD_CONFIG = %s" cfg.BUILD_CONFIG
+ log "csc_flags = %s" cfg.csc_flags
+ log "FSC = %s" cfg.FSC
+ log "fsc_flags = %s" cfg.fsc_flags
+ log "FSCOREDLLPATH = %s" cfg.FSCOREDLLPATH
+ log "FSI = %s" cfg.FSI
+#if NETCOREAPP
+ log "DotNetExe =%s" cfg.DotNetExe
+ log "DOTNET_MULTILEVEL_LOOKUP = %s" cfg.DotNetMultiLevelLookup
+ log "DOTNET_ROOT = %s" cfg.DotNetRoot
+#else
+ log "FSIANYCPU = %s" cfg.FSIANYCPU
#endif
- log "FSI_FOR_SCRIPTS =%s" cfg.FSI_FOR_SCRIPTS
- log "fsi_flags =%s" cfg.fsi_flags
- log "ILDASM =%s" cfg.ILDASM
- log "PEVERIFY =%s" cfg.PEVERIFY
+ log "FSI_FOR_SCRIPTS = %s" cfg.FSI_FOR_SCRIPTS
+ log "fsi_flags = %s" cfg.fsi_flags
+ log "ILDASM = %s" cfg.ILDASM
+ log "PEVERIFY = %s" cfg.PEVERIFY
log "---------------------------------------------------------------"
-
let checkResult result =
match result with
| CmdResult.ErrorLevel (msg1, err) -> Assert.Fail (sprintf "%s. ERRORLEVEL %d" msg1 err)
diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj
index fe433e35f2..a6f0066aca 100644
--- a/tests/fsharp/FSharpSuite.Tests.fsproj
+++ b/tests/fsharp/FSharpSuite.Tests.fsproj
@@ -2,8 +2,8 @@
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
win-x86;win-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
true
diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs
index c12080d761..d74a2ef848 100644
--- a/tests/fsharp/single-test.fs
+++ b/tests/fsharp/single-test.fs
@@ -95,7 +95,7 @@ let generateOverrides =
// Arguments:
// pc = ProjectConfiguration
// outputType = OutputType.Exe, OutputType.Library or OutputType.Script
-// targetFramework optimize = "net472" OR NETCOREAPP3.1 etc ...
+// targetFramework optimize = "net472" or net5.0 etc ...
// optimize = true or false
// configuration = "Release" or "Debug"
//
@@ -210,12 +210,12 @@ let singleTestBuildAndRunCore cfg copyFiles p languageVersion =
let extraSources = ["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
let utilitySources = [__SOURCE_DIRECTORY__ ++ "coreclr_utilities.fs"]
let referenceItems = if String.IsNullOrEmpty(copyFiles) then [] else [copyFiles]
- let framework = "netcoreapp3.1"
+ let framework = "net5.0"
// Arguments:
// outputType = OutputType.Exe, OutputType.Library or OutputType.Script
// compilerType = "coreclr" or "net40"
- // targetFramework optimize = "net472" OR NETCOREAPP3.1 etc ...
+ // targetFramework optimize = "net472" OR net5.0 etc ...
// optimize = true or false
let executeSingleTestBuildAndRun outputType compilerType targetFramework optimize buildOnly =
let mutable result = false
@@ -304,9 +304,9 @@ let singleTestBuildAndRunCore cfg copyFiles p languageVersion =
printfn "Filename: %s" projectFileName
match p with
- | FSC_CORECLR -> executeSingleTestBuildAndRun OutputType.Exe "coreclr" "netcoreapp3.1" true false
- | FSC_CORECLR_BUILDONLY -> executeSingleTestBuildAndRun OutputType.Exe "coreclr" "netcoreapp3.1" true true
- | FSI_CORECLR -> executeSingleTestBuildAndRun OutputType.Script "coreclr" "netcoreapp3.1" true false
+ | FSC_CORECLR -> executeSingleTestBuildAndRun OutputType.Exe "coreclr" "net5.0" true false
+ | FSC_CORECLR_BUILDONLY -> executeSingleTestBuildAndRun OutputType.Exe "coreclr" "net5.0" true true
+ | FSI_CORECLR -> executeSingleTestBuildAndRun OutputType.Script "coreclr" "net5.0" true false
#if !NETCOREAPP
| FSC_BUILDONLY -> executeSingleTestBuildAndRun OutputType.Exe "net40" "net472" false true
diff --git a/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj b/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj
index 2a136927b3..affe87d529 100644
--- a/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj
+++ b/tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj
@@ -2,8 +2,8 @@
Exe
- net472;netcoreapp3.1
- netcoreapp3.1
+ net472;net5.0
+ net5.0
$(NoWarn);1591
diff --git a/tests/service/Common.fs b/tests/service/Common.fs
index 2448751754..03dbedca2f 100644
--- a/tests/service/Common.fs
+++ b/tests/service/Common.fs
@@ -87,7 +87,7 @@ let sysLib nm =
[]
module Helpers =
type DummyType = A | B
- let PathRelativeToTestAssembly p = Path.Combine(Path.GetDirectoryName(Uri(typeof.Assembly.CodeBase).LocalPath), p)
+ let PathRelativeToTestAssembly p = Path.Combine(Path.GetDirectoryName(Uri(typeof.Assembly.Location).LocalPath), p)
let fsCoreDefaultReference() =
PathRelativeToTestAssembly "FSharp.Core.dll"