diff --git a/Directory.Build.props b/Directory.Build.props
index ed0556c07fa..3dd057f702b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,12 +4,12 @@
$(FSharpLangVersion)
$(MSBuildThisFileDirectory)
true
+ net8.0
@@ -21,7 +21,7 @@
true
-
+
false
@@ -30,15 +30,40 @@
$(MSBuildThisFileDirectory)artifacts/
$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/
$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/
- $(ArtifactsDir)/bin/fslex/$(Configuration)/net8.0/fslex.dll
- $(ArtifactsDir)/bin/fsyacc/$(Configuration)/net8.0/fsyacc.dll
+
+ $(ArtifactsDir)/bin/fslex/$(Configuration)/$(FSharpNetCoreProductDefaultTargetFramework)/fslex.dll
+ $(ArtifactsDir)/bin/fsyacc/$(Configuration)/$(FSharpNetCoreProductDefaultTargetFramework)/fsyacc.dll
NO_CHECKNULLS;BUILDING_WITH_LKG;NO_NULLCHECKING_LIB_SUPPORT;$(DefineConstants)
+
-
+
+
+
+
+
+
+ $(NetCurrent)
+
+
+
+
+ $(FSharpNetCoreProductDefaultTargetFramework)
+
+
+
-
-
+
+
diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props
index 03c26b4b075..2be5d4f2702 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)\net8.0\fsc.dll
+ $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(FSharpNetCoreProductTargetFramework)\fsc.dll
$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
dotnet.exe
dotnet
- $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net8.0\fsi.dll
+ $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\$(FSharpNetCoreProductTargetFramework)\fsi.dll
<_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472
- <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net8.0
+ <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">$(FSharpNetCoreProductTargetFramework)
<_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework)
$(_FSharpBuildBinPath)\FSharp.Build.dll
diff --git a/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/buildtools/AssemblyCheck/AssemblyCheck.fsproj
index 46ffb722cd4..1f01406c734 100644
--- a/buildtools/AssemblyCheck/AssemblyCheck.fsproj
+++ b/buildtools/AssemblyCheck/AssemblyCheck.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
false
diff --git a/buildtools/checkpackages/FSharp.Compiler.Service_notshipped.fsproj b/buildtools/checkpackages/FSharp.Compiler.Service_notshipped.fsproj
index 514b1f4ddf6..8a0874bff6a 100644
--- a/buildtools/checkpackages/FSharp.Compiler.Service_notshipped.fsproj
+++ b/buildtools/checkpackages/FSharp.Compiler.Service_notshipped.fsproj
@@ -1,9 +1,9 @@
-
+
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
$(MSBuildProjectDirectory)\..\..\artifacts\tmp\$([System.Guid]::NewGuid())
$(CachePath)\bin
diff --git a/buildtools/fslex/fslex.fsproj b/buildtools/fslex/fslex.fsproj
index 674dde7c759..50c1e4e3668 100644
--- a/buildtools/fslex/fslex.fsproj
+++ b/buildtools/fslex/fslex.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
false
LatestMajor
diff --git a/buildtools/fsyacc/fsyacc.fsproj b/buildtools/fsyacc/fsyacc.fsproj
index fc072b7cf02..0cc67482b3a 100644
--- a/buildtools/fsyacc/fsyacc.fsproj
+++ b/buildtools/fsyacc/fsyacc.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
false
LatestMajor
diff --git a/eng/Build.ps1 b/eng/Build.ps1
index fe7eb56a5b1..049ba91217d 100644
--- a/eng/Build.ps1
+++ b/eng/Build.ps1
@@ -36,6 +36,7 @@ param (
[switch][Alias('proto')]$bootstrap,
[string]$bootstrapConfiguration = "Proto",
[string]$bootstrapTfm = "net472",
+ [string]$fsharpNetCoreProductTfm = "net8.0",
[switch][Alias('bl')]$binaryLog = $true,
[switch][Alias('nobl')]$excludeCIBinaryLog = $false,
[switch][Alias('nolog')]$noBinaryLog = $false,
@@ -76,6 +77,9 @@ $ErrorActionPreference = "Stop"
$BuildCategory = ""
$BuildMessage = ""
+$desktopTargetFramework = "net472"
+$coreclrTargetFramework = "net8.0"
+
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
@@ -229,11 +233,11 @@ function Process-Arguments() {
function Update-Arguments() {
if ($script:noVisualStudio) {
- $script:bootstrapTfm = "net8.0"
+ $script:bootstrapTfm = $script:coreclrTargetFramework
$script:msbuildEngine = "dotnet"
}
- if ($bootstrapTfm -eq "net8.0") {
+ if ($bootstrapTfm -eq $script:coreclrTargetFramework) {
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
$script:bootstrap = $True
}
@@ -255,7 +259,7 @@ function BuildSolution([string] $solutionName, $nopack) {
$officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci
- $testTargetFrameworks = if ($testCoreClr) { "net8.0" } else { "" }
+ $testTargetFrameworks = if ($testCoreClr) { $script:coreclrTargetFramework } else { "" }
# Do not set the property to true explicitly, since that would override value projects might set.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
@@ -312,8 +316,8 @@ function UpdatePath() {
}
TestAndAddToPath $subdir
- TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net472"
- TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net472"
+ TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\$script:desktopTargetFramework"
+ TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\$script:desktopTargetFramework"
}
function VerifyAssemblyVersionsAndSymbols() {
@@ -565,18 +569,16 @@ try {
$script:BuildCategory = "Test"
$script:BuildMessage = "Failure running tests"
- $desktopTargetFramework = "net472"
- $coreclrTargetFramework = "net8.0"
if ($testCoreClr) {
- $bgJob = TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true
+ $bgJob = TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
# Collect output from background jobs
Wait-job $bgJob | out-null
@@ -584,14 +586,14 @@ try {
}
if ($testDesktop) {
- $bgJob = TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true
+ $bgJob = TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
# Collect output from background jobs
Wait-job $bgJob | out-null
@@ -609,7 +611,7 @@ try {
UpdatePath
$env:HOSTED_COMPILER = 1
$env:CSC_PIPE = "$nugetPackages\Microsoft.Net.Compilers\4.3.0-1.22220.8\tools\csc.exe"
- $env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
+ $env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\$script:desktopTargetFramework\FSharp.Core.dll"
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
@@ -626,46 +628,46 @@ try {
}
if ($testFSharpCore) {
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\"
}
if ($testCompiler) {
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
}
if ($testCompilerComponentTests) {
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true
}
if ($testCompilerService) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
}
if ($testCambridge) {
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\"
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\"
+ TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\"
}
if ($testScripting) {
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
- TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
}
if ($testVs -and -not $noVisualStudio) {
- TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj"
- TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\VisualFSharp.UnitTests\"
+ TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj"
+ TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\VisualFSharp.UnitTests\"
}
if ($testIntegration) {
- TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.IntegrationTests\"
+ TestUsingXUnit -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.IntegrationTests\"
}
if ($testAOT) {
diff --git a/eng/DumpPackageRoot/DumpPackageRoot.csproj b/eng/DumpPackageRoot/DumpPackageRoot.csproj
index 5cbfdca4db5..da79505fcf1 100644
--- a/eng/DumpPackageRoot/DumpPackageRoot.csproj
+++ b/eng/DumpPackageRoot/DumpPackageRoot.csproj
@@ -3,7 +3,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 3ac9370d1a5..550215bd643 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -24,6 +24,10 @@
+
+
+ --tfm $(SourceBuildBootstrapTfm)
+
diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1
index a0c5299cb95..f73195c7ccd 100644
--- a/eng/build-utils.ps1
+++ b/eng/build-utils.ps1
@@ -14,6 +14,7 @@ $nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
$bootstrapDir = if (Test-Path variable:bootstrapDir) { $bootstrapDir } else { "" }
$bootstrapConfiguration = if (Test-Path variable:bootstrapConfiguration) { $bootstrapConfiguration } else { "Proto" }
$bootstrapTfm = if (Test-Path variable:bootstrapTfm) { $bootstrapTfm } else { "net472" }
+$fsharpNetCoreProductTfm = if (Test-Path variable:fsharpNetCoreProductTfm) { $fsharpNetCoreProductTfm } else { "net8.0" }
$properties = if (Test-Path variable:properties) { $properties } else { @() }
function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net472", [string]$rid = "", [bool]$published = $false) {
@@ -230,7 +231,7 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]
# Important to not set $script:bootstrapDir here yet as we're actually in the process of
# building the bootstrap.
function Make-BootstrapBuild() {
- Write-Host "Building bootstrap '$bootstrapTfm' compiler"
+ Write-Host "Building bootstrap '$bootstrapTfm' compiler with '$fsharpNetCoreProductTfm' .NET Core product TFM"
$dir = Join-Path $ArtifactsDir "Bootstrap"
Remove-Item -re $dir -ErrorAction SilentlyContinue
@@ -251,9 +252,9 @@ function Make-BootstrapBuild() {
}
Exec-Console $dotnetExe $args
- Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net8.0" -Destination "$dir\fslex" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net8.0" -Destination "$dir\fsyacc" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net8.0" -Destination "$dir\AssemblyCheck" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\$fsharpNetCoreProductTfm" -Destination "$dir\fslex" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\$fsharpNetCoreProductTfm" -Destination "$dir\fsyacc" -Force -Recurse
+ Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\$fsharpNetCoreProductTfm" -Destination "$dir\AssemblyCheck" -Force -Recurse
# prepare compiler
$protoProject = "`"$RepoRoot\proto.sln`""
diff --git a/eng/build.sh b/eng/build.sh
index b8915397d25..6e5d09b79d5 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -34,6 +34,7 @@ usage()
echo " --skipBuild Do not run the build"
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --sourceBuild Simulate building for source-build"
+ echo " --tfm Override the default target framework"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
}
@@ -72,6 +73,8 @@ properties=""
docker=false
args=""
+tfm="net8.0" # This needs to be changed every time it's bumped by arcade/us.
+
BuildCategory=""
BuildMessage=""
@@ -149,6 +152,10 @@ while [[ $# > 0 ]]; do
--sourcebuild)
source_build=true
;;
+ --tfm)
+ tfm=$2
+ shift
+ ;;
/p:*)
properties="$properties $1"
;;
@@ -269,8 +276,8 @@ function BuildSolution {
MSBuild "$repo_root/buildtools/buildtools.proj" /restore "$bltools" /p:Configuration=$bootstrap_config
mkdir -p "$bootstrap_dir"
- cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net8.0 $bootstrap_dir/fslex
- cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net8.0 $bootstrap_dir/fsyacc
+ cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/$tfm $bootstrap_dir/fslex
+ cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/$tfm $bootstrap_dir/fsyacc
fi
if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
local bltools=""
@@ -279,7 +286,7 @@ function BuildSolution {
fi
BuildMessage="Error building bootstrap"
MSBuild "$repo_root/Proto.sln" /restore "$bltools" /p:Configuration=$bootstrap_config
- cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net8.0 $bootstrap_dir/fsc
+ cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/$tfm $bootstrap_dir/fsc
fi
fi
@@ -321,7 +328,7 @@ InitializeDotNetCli $restore
BuildSolution
if [[ "$test_core_clr" == true ]]; then
- coreclrtestframework=net8.0
+ coreclrtestframework=$tfm
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
@@ -331,7 +338,7 @@ if [[ "$test_core_clr" == true ]]; then
fi
if [[ "$test_compilercomponent_tests" == true ]]; then
- coreclrtestframework=net8.0
+ coreclrtestframework=$tfm
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter
fi
diff --git a/eng/test-determinism.ps1 b/eng/test-determinism.ps1
index 5b9a079f078..499c1187a0d 100644
--- a/eng/test-determinism.ps1
+++ b/eng/test-determinism.ps1
@@ -378,9 +378,10 @@ try {
$script:bootstrap = $true
$script:bootstrapConfiguration = "Proto"
$script:bootstrapTfm = "net472"
+ $script:fsharpNetCoreProductTfm = "net8.0"
if ($script:msbuildEngine -eq "dotnet") {
- $script.bootstrapTfm = "net8.0"
+ $script.bootstrapTfm = $script:fsharpNetCoreProductTfm
}
$bootstrapDir = Make-BootstrapBuild
diff --git a/fcs-samples/EditorService/EditorService.fsproj b/fcs-samples/EditorService/EditorService.fsproj
index e4103999fcb..214bb75afc9 100644
--- a/fcs-samples/EditorService/EditorService.fsproj
+++ b/fcs-samples/EditorService/EditorService.fsproj
@@ -1,7 +1,7 @@
- $(FcsTargetNetFxFramework);net8.0
+ $(FcsTargetNetFxFramework);$(FSharpNetCoreProductTargetFramework)
true
Exe
false
diff --git a/src/Compiler/FSharp.Compiler.Service.fsproj b/src/Compiler/FSharp.Compiler.Service.fsproj
index dd7b6e25c1a..6a52de46022 100644
--- a/src/Compiler/FSharp.Compiler.Service.fsproj
+++ b/src/Compiler/FSharp.Compiler.Service.fsproj
@@ -543,15 +543,15 @@
- TargetFramework=net8.0
+ TargetFramework=$(FSharpNetCoreProductTargetFramework)
compile
- TargetFramework=net8.0
+ TargetFramework=$(FSharpNetCoreProductTargetFramework)
compile
- TargetFramework=net8.0
+ TargetFramework=$(FSharpNetCoreProductTargetFramework)
compile
diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj
index a427f7006dd..7c186a76bb4 100644
--- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj
+++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj
@@ -3,7 +3,7 @@
true
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
Microsoft.FSharp.Compiler.nuspec
true
.NET Core compatible version of the F# compiler fsc.exe.
@@ -24,6 +24,7 @@
+
diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec
index ca36309d5da..24df391b69f 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\$fSharpNetCoreProductTargetFramework$" />
+ target="lib\$fSharpNetCoreProductTargetFramework$" />
@@ -45,14 +45,14 @@
-
+
+ target="lib\$fSharpNetCoreProductTargetFramework$" />
-
+ target="lib\$fSharpNetCoreProductTargetFramework$" />
+
+ target="lib\$fSharpNetCoreProductTargetFramework$" />
diff --git a/src/fsc/fscProject/fsc.fsproj b/src/fsc/fscProject/fsc.fsproj
index 64c4651a7f4..b382709200d 100644
--- a/src/fsc/fscProject/fsc.fsproj
+++ b/src/fsc/fscProject/fsc.fsproj
@@ -3,15 +3,15 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
x86
Debug;Release;Proto;ReleaseCompressed
net472
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
x86
diff --git a/src/fsi/fsiProject/fsi.fsproj b/src/fsi/fsiProject/fsi.fsproj
index dd17f8bd53d..653122fc76d 100644
--- a/src/fsi/fsiProject/fsi.fsproj
+++ b/src/fsi/fsiProject/fsi.fsproj
@@ -3,15 +3,15 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
x86
Debug;Release;Proto;ReleaseCompressed
net472
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
x86
diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
index b05e1882f6e..ba15e56c359 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj
@@ -2,7 +2,7 @@
Library
- net8.0;net472
+ $(FSharpNetCoreProductTargetFramework);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 5da0cbb3bfb..da2c065fe49 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj
@@ -2,7 +2,7 @@
Library
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
$(TestTargetFramework)
false
NO_GENERATIVE
diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
index 96006f06673..4a8d1df2302 100644
--- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
+++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj
@@ -2,7 +2,7 @@
Library
- net8.0;net472
+ $(FSharpNetCoreProductTargetFramework);net472
typeproviders
$(FSharpCoreShippedPackageVersionValue)
typeproviders
diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
index e3c796d0bdd..0a2421f3262 100644
--- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
+++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
Library
true
xunit
diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
index ec4fc441f29..ebfe6938aa8 100644
--- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
+++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
@@ -3,8 +3,8 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
Library
false
true
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 cdfd467e5c3..8f69b337c5a 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;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
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 780ba10f3f4..59b5fc43d65 100644
--- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -3,8 +3,8 @@
Exe
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
$(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 0e4b91b42a7..dd3e21cea91 100644
--- a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj
+++ b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
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 4b6c5c53481..9acbcef398e 100644
--- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
@@ -3,8 +3,8 @@
- net8.0;net472
- net8.0
+ $(FSharpNetCoreProductTargetFramework);net472
+ $(FSharpNetCoreProductTargetFramework)
Library
FSharp.Core.UnitTests
diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
index 8c18161775f..0bee6d1e015 100644
--- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
+++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
@@ -1,8 +1,8 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
win-x86;win-x64;linux-x64;osx-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
true
diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.csproj b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.csproj
index 50bba8f6f23..168c8b546e6 100644
--- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.csproj
+++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/CS/MicroPerfCSharp.csproj
@@ -1,7 +1,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
Library
8.0
diff --git a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj
index 919c4cc073c..c96d342298f 100644
--- a/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj
+++ b/tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj
@@ -1,6 +1,6 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
Exe
true
diff --git a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj
index 9706167ff62..31d404fb061 100644
--- a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj
+++ b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
Exe
true
diff --git a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj
index d23714e40f2..29148a7450d 100644
--- a/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj
+++ b/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerfCSharp/TaskPerfCSharp.csproj
@@ -1,7 +1,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
Library
8.0
diff --git a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.Runner/HistoricalBenchmark.Runner.fsproj b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.Runner/HistoricalBenchmark.Runner.fsproj
index fe6d95f9050..1781b4784dc 100644
--- a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.Runner/HistoricalBenchmark.Runner.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.Runner/HistoricalBenchmark.Runner.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
HistoricalBenchmark.Utilities
$(NoWarn);NETSDK1206
diff --git a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
index 09ca5cb6912..48cfa7b4975 100644
--- a/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/BenchmarkComparison/HistoricalBenchmark.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
Release
diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
index 043de02d374..c7a873a2cc4 100644
--- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
false
diff --git a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
index 92255adb462..265ab45ac19 100644
--- a/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
+++ b/tests/benchmarks/FCSBenchmarks/FCSSourceFiles/FCSSourceFiles.fsproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
diff --git a/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj b/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj
index 2e6b2e9ceb7..615a5ab3a77 100644
--- a/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj
+++ b/tests/benchmarks/FSharp.Benchmarks.Common/FSharp.Benchmarks.Common.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj
index b6d69d8ae1a..ac97046351b 100644
--- a/tests/fsharp/FSharpSuite.Tests.fsproj
+++ b/tests/fsharp/FSharpSuite.Tests.fsproj
@@ -2,8 +2,8 @@
- net472;net8.0
- net8.0
+ net472;$(FSharpNetCoreProductTargetFramework)
+ $(FSharpNetCoreProductTargetFramework)
win-x86;win-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
true
diff --git a/tests/projects/Sample_ConsoleApp_FileSystemTests/Sample_ConsoleApp_net7.fsproj b/tests/projects/Sample_ConsoleApp_FileSystemTests/Sample_ConsoleApp_net7.fsproj
index 13d42aeb283..6fa21d9b264 100644
--- a/tests/projects/Sample_ConsoleApp_FileSystemTests/Sample_ConsoleApp_net7.fsproj
+++ b/tests/projects/Sample_ConsoleApp_FileSystemTests/Sample_ConsoleApp_net7.fsproj
@@ -2,13 +2,13 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
true
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
False
True
diff --git a/tests/projects/Sample_ConsoleApp_net7/Sample_ConsoleApp_net7.fsproj b/tests/projects/Sample_ConsoleApp_net7/Sample_ConsoleApp_net7.fsproj
index bf06c1ce7a3..94e78cddcfc 100644
--- a/tests/projects/Sample_ConsoleApp_net7/Sample_ConsoleApp_net7.fsproj
+++ b/tests/projects/Sample_ConsoleApp_net7/Sample_ConsoleApp_net7.fsproj
@@ -2,13 +2,13 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
preview
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
False
True
diff --git a/tests/projects/Sample_Local_Compiler_and_FSLib/LocalCompilerAndFslib.fsproj b/tests/projects/Sample_Local_Compiler_and_FSLib/LocalCompilerAndFslib.fsproj
index c2164b65666..4f47ab1a711 100644
--- a/tests/projects/Sample_Local_Compiler_and_FSLib/LocalCompilerAndFslib.fsproj
+++ b/tests/projects/Sample_Local_Compiler_and_FSLib/LocalCompilerAndFslib.fsproj
@@ -2,15 +2,15 @@
Exe
- net8.0
+ $(FSharpNetCoreProductTargetFramework)
preview
true
true
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
- $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
+ $(MSBuildThisFileDirectory)../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll
False
True
diff --git a/tests/projects/misc/SelfDefinedTailCallAttribute/tailcallaltattr.fsproj b/tests/projects/misc/SelfDefinedTailCallAttribute/tailcallaltattr.fsproj
index 92c5ae861d4..45f9002aa14 100644
--- a/tests/projects/misc/SelfDefinedTailCallAttribute/tailcallaltattr.fsproj
+++ b/tests/projects/misc/SelfDefinedTailCallAttribute/tailcallaltattr.fsproj
@@ -7,7 +7,7 @@
- $(MSBuildThisFileDirectory)../../../../artifacts/bin/fsc/Debug/net8.0/fsc.dll
+ $(MSBuildThisFileDirectory)../../../../artifacts/bin/fsc/Debug/$(FSharpNetCoreProductTargetFramework)/fsc.dll