Skip to content
Merged
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
6 changes: 3 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)\netcoreapp3.1\fsc.dll</DotnetFscCompilerPath>
<DotnetFscCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net5.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)\netcoreapp3.1\fsi.dll</DotnetFsiCompilerPath>
<DotnetFsiCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net5.0\fsi.dll</DotnetFsiCompilerPath>
</PropertyGroup>

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

<FSharpBuildAssemblyFile>$(_FSharpBuildBinPath)\FSharp.Build.dll</FSharpBuildAssemblyFile>
Expand Down
26 changes: 0 additions & 26 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')) }}:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp-core-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 { "" }
Expand Down Expand Up @@ -437,6 +437,11 @@ try {
$buildTool = InitializeBuildTool
$toolsetBuildProj = InitializeToolset
TryDownloadDotnetFrameworkSdk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brettfo , this was the main problem, the ci sets DOTNET_ROOT to a the global location. Here we set it to the local download location first, so that the local and global frameworks are selectable by dotnet.exe

$dotnetPath = InitializeDotNetCli
$env:DOTNET_ROOT="$dotnetPath"
Get-Item -Path Env:

if ($bootstrap) {
$script:BuildMessage = "Failure building bootstrap compiler"
$bootstrapDir = Make-BootstrapBuild
Expand All @@ -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
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>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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`""
Expand Down
8 changes: 4 additions & 4 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
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);netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>$(FcsTargetNetFxFramework);net5.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
Expand Down
4 changes: 2 additions & 2 deletions proto.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<AdditionalProperties>TargetFramework=netstandard2.0</AdditionalProperties>
</Projects>
<Projects Include="src\fsharp\fsc\fsc.fsproj">
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp3.1</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=net5.0</AdditionalProperties>
</Projects>
<Projects Include="src\fsharp\fsi\fsi.fsproj">
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp3.1</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=net5.0</AdditionalProperties>
</Projects>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/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>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/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>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/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>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PreRelease>true</PreRelease>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<NuspecFile>Microsoft.FSharp.Compiler.nuspec</NuspecFile>
<IsPackable>true</IsPackable>
<PackageDescription>.NET Core compatible version of the F# compiler fsc.exe.</PackageDescription>
Expand All @@ -11,10 +11,10 @@

<ItemGroup>
<ProjectReference Include="..\fsc\fsc.fsproj">
<AdditionalProperties>TargetFramework=netcoreapp3.1</AdditionalProperties>
<AdditionalProperties>TargetFramework=net5.0</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="..\fsi\fsi.fsproj">
<AdditionalProperties>TargetFramework=netcoreapp3.1</AdditionalProperties>
<AdditionalProperties>TargetFramework=net5.0</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="..\FSharp.Build\FSharp.Build.fsproj">
<AdditionalProperties>TargetFramework=netstandard2.0</AdditionalProperties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$CommonMetadataElements$
<language>en-US</language>
<dependencies>
<group targetFramework=".NETCoreApp3.1">
<group targetFramework=".NET5.0">
<dependency id="Microsoft.NETCore.Platforms" version="2.0.0" />
<dependency id="NETStandard.Library" version="2.0.0" />
<dependency id="System.Collections.Immutable" version="1.5.0" />
Expand Down Expand Up @@ -46,33 +46,33 @@
this approach gives a very small deployment. Which is kind of necessary.
-->
<!-- assemblies -->
<file src="fsc\$Configuration$\netcoreapp3.1\fsc.dll" target="lib\netcoreapp3.1" />
<file src="fsi\$Configuration$\netcoreapp3.1\fsi.dll" target="lib\netcoreapp3.1" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.dll" target="lib\netcoreapp3.1" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.xml" target="lib\netcoreapp3.1" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\FSharp.Compiler.Service.dll" target="lib\netcoreapp3.1" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\FSharp.Build.dll" target="lib\netcoreapp3.1" />
<file src="fsc\$Configuration$\net5.0\fsc.dll" target="lib\net5.0" />
<file src="fsi\$Configuration$\net5.0\fsi.dll" target="lib\net5.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.dll" target="lib\net5.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.xml" target="lib\net5.0" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\FSharp.Compiler.Service.dll" target="lib\net5.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\FSharp.Build.dll" target="lib\net5.0" />
<file src="FSharp.DependencyManager.Nuget\$configuration$\netstandard2.0\FSharp.DependencyManager.Nuget.dll"
target="lib\netcoreapp3.1" />
target="lib\net5.0" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\FSharp.Compiler.Interactive.Settings.dll"
target="lib\netcoreapp3.1" />
target="lib\net5.0" />

<!-- additional files -->
<file src="fsc\$Configuration$\netcoreapp3.1\default.win32manifest" target="contentFiles\any\any" />
<file src="fsc\$Configuration$\net5.0\default.win32manifest" target="contentFiles\any\any" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\Microsoft.FSharp.Targets" target="contentFiles\any\any" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\Microsoft.Portable.FSharp.Targets" target="contentFiles\any\any" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\Microsoft.FSharp.NetSdk.props" target="contentFiles\any\any" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\Microsoft.FSharp.NetSdk.targets" target="contentFiles\any\any" />
<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\netcoreapp3.1" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\**\FSharp.Core.resources.dll" target="lib\net5.0" />
<file src="FSharp.Compiler.Service\$Configuration$\netstandard2.0\**\FSharp.Compiler.Service.resources.dll"
target="lib\netcoreapp3.1" />
target="lib\net5.0" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\**\FSharp.Compiler.Interactive.Settings.resources.dll"
target="lib\netcoreapp3.1" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\**\FSharp.Build.resources.dll" target="lib\netcoreapp3.1" />
target="lib\net5.0" />
<file src="FSharp.Build\$Configuration$\netstandard2.0\**\FSharp.Build.resources.dll" target="lib\net5.0" />
<file src="FSharp.DependencyManager.Nuget\$configuration$\netstandard2.0\**\FSharp.DependencyManager.Nuget.resources.dll"
target="lib\netcoreapp3.1" />
target="lib\net5.0" />
</files>
</package>
Loading