Skip to content
Merged

To net70 #13706

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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}"
],
Expand Down
7 changes: 6 additions & 1 deletion FSharpBuild.Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Import Project="eng\targets\NuGet.targets" />
<Import Project="FSharp.Profiles.props" />

<PropertyGroup>
<DefineConstants Condition="'$(Configuration)'=='release'">$(DefineConstants);Release</DefineConstants>
<DefineConstants Condition="'$(Configuration)'=='debug'">$(DefineConstants);Debug</DefineConstants>
</PropertyGroup>

<ItemDefinitionGroup>
<NoneSubstituteText>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
Expand Down Expand Up @@ -137,8 +142,8 @@
</PropertyGroup>

<Target Name="PrefixRepoToReleaseNotes"
AfterTargets="InitializeSourceControlInformationFromSourceControlManager"
BeforeTargets="InitializeStandardNuspecProperties"
DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager"
Condition="'$(IsPackable)'=='true'">

<PropertyGroup>
Expand Down
7 changes: 4 additions & 3 deletions FSharpTests.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
<FscToolPath>$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))</FscToolPath>
<FscToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FscToolExe>
<FscToolExe Condition="'$(OS)' == 'Unix'">dotnet</FscToolExe>
<DotnetFscCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net6.0\fsc.dll</DotnetFscCompilerPath>
<DotnetFscCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net7.0\fsc.dll</DotnetFscCompilerPath>

<FsiToolPath>$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))</FsiToolPath>
<FsiToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FsiToolExe>
<FsiToolExe Condition="'$(OS)' == 'Unix'">dotnet</FsiToolExe>
<DotnetFsiCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net6.0\fsi.dll</DotnetFsiCompilerPath>
<DotnetFsiCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net7.0\fsi.dll</DotnetFsiCompilerPath>
</PropertyGroup>

<!-- SDK targets override -->
<PropertyGroup>
<_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472</_FSharpBuildTargetFramework>
<_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net6.0</_FSharpBuildTargetFramework>
<_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net7.0</_FSharpBuildTargetFramework>
<_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework)</_FSharpBuildBinPath>

<FSharpBuildAssemblyFile>$(_FSharpBuildBinPath)\FSharp.Build.dll</FSharpBuildAssemblyFile>
Expand All @@ -42,6 +42,7 @@
<FSharpPropsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<FSharpTargetsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>
<FSharpOverridesTargetsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.Overrides.NetSdk.targets</FSharpOverridesTargetsShim>

</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion buildtools/AssemblyCheck/AssemblyCheck.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion buildtools/fslex/fslex.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
Expand Down
2 changes: 1 addition & 1 deletion buildtools/fsyacc/fsyacc.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
Expand Down
8 changes: 4 additions & 4 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 { "" }
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eng/DumpPackageRoot/DumpPackageRoot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Used as a diagnostic tool to view the state of the NuGet package cache as it existed immediately after a restore/build. -->

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<SystemIoCompressionVersion>4.3.0</SystemIoCompressionVersion>
<SystemLinqExpressionsVersion>4.3.0</SystemLinqExpressionsVersion>
<SystemLinqQueryableVersion>4.3.0</SystemLinqQueryableVersion>
<SystemMemoryVersion>4.5.4</SystemMemoryVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemNetRequestsVersion>4.3.0</SystemNetRequestsVersion>
<SystemNetSecurityVersion>4.3.1</SystemNetSecurityVersion>
<SystemReflectionEmitVersion>4.3.0</SystemReflectionEmitVersion>
Expand Down
6 changes: 3 additions & 3 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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`""
Expand Down
10 changes: 5 additions & 5 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,16 @@ 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"
MSBuild "$repo_root/Proto.sln" \
/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

Expand Down Expand Up @@ -312,7 +312,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
Expand All @@ -322,7 +322,7 @@ if [[ "$test_core_clr" == true ]]; then
fi

if [[ "$test_compilercomponent_tests" == true ]]; then
coreclrtestframework=net6.0
coreclrtestframework=net7.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter
fi

Expand Down
2 changes: 1 addition & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ function MSBuild-Core {
}
}

RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci /bl "$@"
}

ResolvePath "${BASH_SOURCE[0]}"
Expand Down
2 changes: 1 addition & 1 deletion eng/test-determinism.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ try {
$script:bootstrapTfm = "net472"

if ($script:msbuildEngine -eq "dotnet") {
$script.bootstrapTfm = "net6.0"
$script.bootstrapTfm = "net7.0"
}

$bootstrapDir = Make-BootstrapBuild
Expand Down
2 changes: 1 addition & 1 deletion fcs-samples/EditorService/EditorService.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>$(FcsTargetNetFxFramework);net6.0</TargetFrameworks>
<TargetFrameworks>$(FcsTargetNetFxFramework);net7.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "7.0.100-preview.7.22377.5",
"version": "7.0.100-preview.6.22352.1",
"allowPrerelease": true,
"rollForward": "latestMajor"
},
"tools": {
"dotnet": "7.0.100-preview.7.22377.5",
"dotnet": "7.0.100-preview.6.22352.1",
"vs": {
"version": "17.0",
"components": [
Expand All @@ -18,7 +18,7 @@
"perl": "5.32.1.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22419.1",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22411.2",
"Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22411.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PreRelease>true</PreRelease>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NuspecFile>Microsoft.FSharp.Compiler.nuspec</NuspecFile>
<IsPackable>true</IsPackable>
<PackageDescription>.NET Core compatible version of the F# compiler fsc.exe.</PackageDescription>
Expand Down
28 changes: 14 additions & 14 deletions src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$CommonMetadataElements$
<language>en-US</language>
<dependencies>
<group targetFramework=".NET6.0" />
<group targetFramework=".NET7.0" />
</dependencies>
<contentFiles>
<files include="any\any\default.win32manifest" buildAction="Content" copyToOutput="true" flatten="false" />
Expand All @@ -26,16 +26,16 @@
this approach gives a very small deployment. Which is kind of necessary.
-->
<!-- assemblies -->
<file src="fsc\$Configuration$\net6.0\fsc.dll" target="lib\net6.0" />
<file src="fsi\$Configuration$\net6.0\fsi.dll" target="lib\net6.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.dll" target="lib\net6.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.xml" target="lib\net6.0" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\FSharp.Compiler.Service.dll" target="lib\net6.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\FSharp.Build.dll" target="lib\net6.0" />
<file src="fsc\$Configuration$\net7.0\fsc.dll" target="lib\net7.0" />
<file src="fsi\$Configuration$\net7.0\fsi.dll" target="lib\net7.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.dll" target="lib\net7.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.xml" target="lib\net7.0" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\FSharp.Compiler.Service.dll" target="lib\net7.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\FSharp.Build.dll" target="lib\net7.0" />
<file src="FSharp.DependencyManager.Nuget\$configuration$\netstandard2.0\FSharp.DependencyManager.Nuget.dll"
target="lib\net6.0" />
target="lib\net7.0" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\FSharp.Compiler.Interactive.Settings.dll"
target="lib\net6.0" />
target="lib\net7.0" />

<!-- additional files -->
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\default.win32manifest" target="contentFiles\any\any" />
Expand All @@ -46,14 +46,14 @@
<file src="FSharp.Build\$Configuration$\netstandard2.0\Microsoft.FSharp.Overrides.NetSdk.targets" target="contentFiles\any\any" />

<!-- resources -->
<file src="FSharp.Core\$Configuration$\netstandard2.0\**\FSharp.Core.resources.dll" target="lib\net6.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\**\FSharp.Core.resources.dll" target="lib\net7.0" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\**\FSharp.Compiler.Service.resources.dll"
target="lib\net6.0" />
target="lib\net7.0" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\**\FSharp.Compiler.Interactive.Settings.resources.dll"
target="lib\net6.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\**\FSharp.Build.resources.dll" target="lib\net6.0" />
target="lib\net7.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\**\FSharp.Build.resources.dll" target="lib\net7.0" />
<file src="FSharp.DependencyManager.Nuget\$configuration$\netstandard2.0\**\FSharp.DependencyManager.Nuget.resources.dll"
target="lib\net6.0" />
target="lib\net7.0" />
<file src="$artifactsPackagesDir$Shipping\FSharp.Core.$fSharpCorePreviewPackageVersion$*nupkg" target="contentFiles\Shipping" />
<file src="$artifactsPackagesDir$Release\FSharp.Core.$fSharpCorePackageVersion$*nupkg" target="contentFiles\Release" />
<file src="$artifactsPackagesDir$Shipping\FSharp.Compiler.Service.$fSharpCompilerServicePreviewPackageVersion$*nupkg"
Expand Down
6 changes: 3 additions & 3 deletions src/fsc/fscProject/fsc.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="'$(BUILD_PROTO)' != 'true'">
<TargetFrameworks Condition="'$(OS)' != 'Unix'">net472;net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Unix'">net472;net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net7.0</TargetFrameworks>
<PlatformTarget Condition="'$(TargetFramework)' == 'net472'">x86</PlatformTarget>
<Configurations>Debug;Release;Proto</Configurations>
</PropertyGroup>

<PropertyGroup Condition="'$(BUILD_PROTO)' == 'true'">
<TargetFrameworks Condition="'$(OS)' != 'Unix'">net472</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net7.0</TargetFrameworks>
<PlatformTarget Condition="'$(TargetFramework)' == 'net472'">x86</PlatformTarget>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/fsi/fsi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="System.Diagnostics.Process" Version="$(SystemDiagnosticsProcessVersion)" />
<PackageReference Include="System.Linq.Expressions" Version="$(SystemLinqExpressionsVersion)" />
<PackageReference Include="System.Reflection.Emit" Version="$(SystemReflectionEmitVersion)" />
Expand Down
Loading