From a7ab580b120b64895aaa4e8ea165949a01f3bbd4 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Fri, 22 Jul 2022 15:03:25 -0700 Subject: [PATCH 1/2] Change TargetFramework to net7.0 --- .vscode/launch.json | 4 +-- FSharpTests.Directory.Build.props | 6 ++-- buildtools/AssemblyCheck/AssemblyCheck.fsproj | 2 +- buildtools/fslex/fslex.fsproj | 2 +- buildtools/fsyacc/fsyacc.fsproj | 2 +- eng/Build.ps1 | 8 +++--- eng/DumpPackageRoot/DumpPackageRoot.csproj | 2 +- eng/build-utils.ps1 | 6 ++-- eng/build.sh | 8 +++--- eng/test-determinism.ps1 | 2 +- .../EditorService/EditorService.fsproj | 2 +- src/Compiler/Driver/FxResolver.fs | 2 +- src/Compiler/Facilities/CompilerLocation.fs | 1 + .../Microsoft.FSharp.Compiler.csproj | 2 +- .../Microsoft.FSharp.Compiler.nuspec | 28 +++++++++---------- src/fsc/fscProject/fsc.fsproj | 6 ++-- src/fsi/fsi.targets | 2 +- src/fsi/fsiProject/fsi.fsproj | 6 ++-- 18 files changed, 46 insertions(+), 45 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d00e32e86bd..c1a48e29a6c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,7 +17,7 @@ // TODO: Shall we assume that it's already been built, or build it every time we debug? // "preLaunchTask": "Build (Debug)", // If you have changed target frameworks, make sure to update the program p - "program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net6.0/fsi.dll", + "program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net7.0/fsi.dll", "cwd": "${workspaceFolder}/src", "console": "integratedTerminal", // This is the default to be able to run in Codespaces. "internalConsoleOptions": "neverOpen", @@ -42,7 +42,7 @@ // TODO: Shall we assume that it's already been built, or build it every time we debug? // "preLaunchTask": "Build (Debug)", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net6.0/fsc.dll", + "program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net7.0/fsc.dll", "args": [ "${input:argsPrompt}" ], diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props index d191970e303..ceb3e19c438 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)\net6.0\fsc.dll + $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net7.0\fsc.dll $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)')) dotnet.exe dotnet - $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net6.0\fsi.dll + $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net7.0\fsi.dll <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472 - <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net6.0 + <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net7.0 <_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework) $(_FSharpBuildBinPath)\FSharp.Build.dll diff --git a/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/buildtools/AssemblyCheck/AssemblyCheck.fsproj index d396c055fec..d82763ddc2e 100644 --- a/buildtools/AssemblyCheck/AssemblyCheck.fsproj +++ b/buildtools/AssemblyCheck/AssemblyCheck.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 true false diff --git a/buildtools/fslex/fslex.fsproj b/buildtools/fslex/fslex.fsproj index fe737d00331..8577bf4e3af 100644 --- a/buildtools/fslex/fslex.fsproj +++ b/buildtools/fslex/fslex.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants) true false diff --git a/buildtools/fsyacc/fsyacc.fsproj b/buildtools/fsyacc/fsyacc.fsproj index 839c919617d..e3a4b88a3a0 100644 --- a/buildtools/fsyacc/fsyacc.fsproj +++ b/buildtools/fsyacc/fsyacc.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants) true false diff --git a/eng/Build.ps1 b/eng/Build.ps1 index aaa91bd91f9..010d465d5d4 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -181,11 +181,11 @@ function Process-Arguments() { function Update-Arguments() { if ($script:noVisualStudio) { - $script:bootstrapTfm = "net6.0" + $script:bootstrapTfm = "net7.0" $script:msbuildEngine = "dotnet" } - if ($bootstrapTfm -eq "net6.0") { + if ($bootstrapTfm -eq "net7.0") { if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) { $script:bootstrap = $True } @@ -206,7 +206,7 @@ function BuildSolution([string] $solutionName) { $officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" } $toolsetBuildProj = InitializeToolset $quietRestore = !$ci - $testTargetFrameworks = if ($testCoreClr) { "net6.0" } else { "" } + $testTargetFrameworks = if ($testCoreClr) { "net7.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 { "" } @@ -493,7 +493,7 @@ try { $script:BuildCategory = "Test" $script:BuildMessage = "Failure running tests" $desktopTargetFramework = "net472" - $coreclrTargetFramework = "net6.0" + $coreclrTargetFramework = "net7.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 fb030a52306..913463393a8 100644 --- a/eng/DumpPackageRoot/DumpPackageRoot.csproj +++ b/eng/DumpPackageRoot/DumpPackageRoot.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1 index 2aca2e02a35..2162fc880cf 100644 --- a/eng/build-utils.ps1 +++ b/eng/build-utils.ps1 @@ -251,9 +251,9 @@ function Make-BootstrapBuild() { } Exec-Console $dotnetExe $args - Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net6.0" -Destination "$dir\fslex" -Force -Recurse - Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net6.0" -Destination "$dir\fsyacc" -Force -Recurse - Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net6.0" -Destination "$dir\AssemblyCheck" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net7.0" -Destination "$dir\fslex" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net7.0" -Destination "$dir\fsyacc" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net7.0" -Destination "$dir\AssemblyCheck" -Force -Recurse # prepare compiler $protoProject = "`"$RepoRoot\proto.sln`"" diff --git a/eng/build.sh b/eng/build.sh index 8bac7ce52b9..18bf7fd9049 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -257,8 +257,8 @@ function BuildSolution { /p:Configuration=$bootstrap_config mkdir -p "$bootstrap_dir" - cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net6.0 $bootstrap_dir/fslex - cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net6.0 $bootstrap_dir/fsyacc + cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net7.0 $bootstrap_dir/fslex + cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net7.0 $bootstrap_dir/fsyacc fi if [ ! -f "$bootstrap_dir/fsc.exe" ]; then BuildMessage="Error building bootstrap" @@ -266,7 +266,7 @@ function BuildSolution { /restore \ /p:Configuration=$bootstrap_config - cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net6.0 $bootstrap_dir/fsc + cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net7.0 $bootstrap_dir/fsc fi fi @@ -308,7 +308,7 @@ InitializeDotNetCli $restore BuildSolution if [[ "$test_core_clr" == true ]]; then - coreclrtestframework=net6.0 + coreclrtestframework=net7.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/eng/test-determinism.ps1 b/eng/test-determinism.ps1 index de136c12564..621fe7c6cd4 100644 --- a/eng/test-determinism.ps1 +++ b/eng/test-determinism.ps1 @@ -379,7 +379,7 @@ try { $script:bootstrapTfm = "net472" if ($script:msbuildEngine -eq "dotnet") { - $script.bootstrapTfm = "net6.0" + $script.bootstrapTfm = "net7.0" } $bootstrapDir = Make-BootstrapBuild diff --git a/fcs-samples/EditorService/EditorService.fsproj b/fcs-samples/EditorService/EditorService.fsproj index 56654b8ee52..6e5b8d99e30 100644 --- a/fcs-samples/EditorService/EditorService.fsproj +++ b/fcs-samples/EditorService/EditorService.fsproj @@ -1,7 +1,7 @@  - $(FcsTargetNetFxFramework);net6.0 + $(FcsTargetNetFxFramework);net7.0 true Exe false diff --git a/src/Compiler/Driver/FxResolver.fs b/src/Compiler/Driver/FxResolver.fs index d769b36678e..70a233a6553 100644 --- a/src/Compiler/Driver/FxResolver.fs +++ b/src/Compiler/Driver/FxResolver.fs @@ -430,7 +430,7 @@ type internal FxResolver | _, -1 -> if isRunningOnCoreClr then // Running on coreclr but no deps.json was deployed with the host so default to 6.0 - Some "net6.0" + Some "net7.0" else // Running on desktop None diff --git a/src/Compiler/Facilities/CompilerLocation.fs b/src/Compiler/Facilities/CompilerLocation.fs index 48daaacf8b7..76955dbff2c 100644 --- a/src/Compiler/Facilities/CompilerLocation.fs +++ b/src/Compiler/Facilities/CompilerLocation.fs @@ -285,6 +285,7 @@ module internal FSharpEnvironment = |] elif typeof.Assembly.GetName().Name = "System.Private.CoreLib" then [| + "net7.0" "net6.0" "net5.0" "netcoreapp3.1" diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj index a16bc1310ee..507a90a4ec8 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj @@ -3,7 +3,7 @@ true Exe - net6.0 + net7.0 Microsoft.FSharp.Compiler.nuspec true .NET Core compatible version of the F# compiler fsc.exe. diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec index ee67b15c5d5..f46b28fd96a 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec @@ -4,7 +4,7 @@ $CommonMetadataElements$ en-US - + @@ -26,16 +26,16 @@ this approach gives a very small deployment. Which is kind of necessary. --> - - - - - - + + + + + + + target="lib\net7.0" /> + target="lib\net7.0" /> @@ -46,14 +46,14 @@ - + + target="lib\net7.0" /> - + target="lib\net7.0" /> + + target="lib\net7.0" /> - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 x86 Debug;Release;Proto net472 - net6.0 + net7.0 x86 diff --git a/src/fsi/fsi.targets b/src/fsi/fsi.targets index ce90d34c3cc..6b6e89dc6f4 100644 --- a/src/fsi/fsi.targets +++ b/src/fsi/fsi.targets @@ -50,7 +50,7 @@ - + diff --git a/src/fsi/fsiProject/fsi.fsproj b/src/fsi/fsiProject/fsi.fsproj index 46ca382c3e0..9708c234241 100644 --- a/src/fsi/fsiProject/fsi.fsproj +++ b/src/fsi/fsiProject/fsi.fsproj @@ -3,15 +3,15 @@ - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 x86 Debug;Release;Proto net472 - net6.0 + net7.0 x86 From 1913c68c0f09599cea991d999f2568ca24b66705 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Thu, 28 Jul 2022 08:56:22 -0700 Subject: [PATCH 2/2] Fix missed capitalization --- src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec index f46b28fd96a..c87a70d9d62 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec @@ -4,7 +4,7 @@ $CommonMetadataElements$ en-US - +