|
4 | 4 | <LangVersion Condition="'$(FSharpLangVersion)' != ''">$(FSharpLangVersion)</LangVersion>
|
5 | 5 | <RepoRoot Condition="'$(RepoRoot)' == ''">$(MSBuildThisFileDirectory)</RepoRoot>
|
6 | 6 | <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
| 7 | + <FSharpNetCoreProductDefaultTargetFramework>net8.0</FSharpNetCoreProductDefaultTargetFramework> |
7 | 8 | </PropertyGroup>
|
8 | 9 | <!--
|
9 | 10 | When developers load the FSharp.Compiler.Service solution we set FSHARPCORE_USE_PACKAGE to true if it hasn't already been set to a value.
|
10 |
| - This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local |
11 |
| - FSharp.Core project. |
12 |
| - We also disable arcade and reset certain artifacts and compiler paths to use default ones |
| 11 | + This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local FSharp.Core project. |
| 12 | + We also disable arcade and reset certain artifacts and compiler paths to use default ones. |
13 | 13 | All settings below can be overriden via CLI switches if needed. -->
|
14 | 14 |
|
15 | 15 | <PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Compiler.Service' and '$(BUILDING_USING_DOTNET)' != 'false'">
|
|
21 | 21 | <BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
|
22 | 22 | </PropertyGroup>
|
23 | 23 |
|
24 |
| - <Import Project="$(RepoRoot)/Directory.Build.props.user" Condition = "Exists('$(RepoRoot)/Directory.Build.props.user')" /> |
| 24 | + <Import Project="$(RepoRoot)/Directory.Build.props.user" Condition="Exists('$(RepoRoot)/Directory.Build.props.user')" /> |
25 | 25 |
|
26 | 26 | <PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
|
27 | 27 | <DisableAutoSetFscCompilerPath>false</DisableAutoSetFscCompilerPath>
|
|
30 | 30 | <ArtifactsDir>$(MSBuildThisFileDirectory)artifacts/</ArtifactsDir>
|
31 | 31 | <OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
|
32 | 32 | <IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
|
33 |
| - <FsLexPath>$(ArtifactsDir)/bin/fslex/$(Configuration)/net8.0/fslex.dll</FsLexPath> |
34 |
| - <FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/net8.0/fsyacc.dll</FsYaccPath> |
| 33 | + <!-- Note, that default framework is used here (the one we use for development in the current cycle), |
| 34 | + since it's a non-arcade and non-sourcebuild scenario --> |
| 35 | + <FsLexPath>$(ArtifactsDir)/bin/fslex/$(Configuration)/$(FSharpNetCoreProductDefaultTargetFramework)/fslex.dll</FsLexPath> |
| 36 | + <FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/$(FSharpNetCoreProductDefaultTargetFramework)/fsyacc.dll</FsYaccPath> |
35 | 37 | <DefineConstants>NO_CHECKNULLS;BUILDING_WITH_LKG;NO_NULLCHECKING_LIB_SUPPORT;$(DefineConstants)</DefineConstants>
|
36 | 38 | </PropertyGroup>
|
| 39 | + <Import Project="$(MSBuildThisFileDirectory)/eng/Versions.props" Condition="'$(DISABLE_ARCADE)' == 'true'" /> |
37 | 40 |
|
38 |
| - <Import Project="$(MSBuildThisFileDirectory)/eng/Versions.props" Condition="'$(DISABLE_ARCADE)' == 'true'"/> |
| 41 | + <Import Project="FSharpBuild.Directory.Build.props" Condition=" '$(FSharpTestCompilerVersion)' == '' " /> |
| 42 | + <!-- To support source-build for the "next" version of .NET without forcing this repo to use it, |
| 43 | + we can utilize arcade's $(NetCurrent) property, and set it ourselves in the arcade-less scenarios. |
| 44 | + For FCS solution, we set it to one for current dev cycle. |
| 45 | + When used with arcade, and inserting/building for net8 branches, it will set it to net8.0, for net9 branches to net9.0 and so on. --> |
| 46 | + <Choose> |
| 47 | + <!-- Once we move to OOP in VS, and major dependants of FCS will move to netcore (not netstandard), |
| 48 | + we should also support $(NetPrevious) for all releases. |
| 49 | + This will likely include FCS and FSharp.Core as well as shipped products. |
| 50 | + Right now, it only covers products we ship (FSC and FSI), not NuGet packages. --> |
| 51 | + <When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'"> |
| 52 | + <PropertyGroup> |
| 53 | + <FSharpNetCoreProductTargetFramework>$(NetCurrent)</FSharpNetCoreProductTargetFramework> |
| 54 | + </PropertyGroup> |
| 55 | + </When> |
| 56 | + <Otherwise> |
| 57 | + <PropertyGroup> |
| 58 | + <FSharpNetCoreProductTargetFramework>$(FSharpNetCoreProductDefaultTargetFramework)</FSharpNetCoreProductTargetFramework> |
| 59 | + </PropertyGroup> |
| 60 | + </Otherwise> |
| 61 | + </Choose> |
39 | 62 |
|
40 |
| - <Import Project="FSharpBuild.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' == '' "/> |
41 |
| - <Import Project="FSharpTests.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' != '' "/> |
| 63 | + <!-- It's important we set TFM before this, since FSharpTests.Directory.Build.props uses it. |
| 64 | + TODO(vlza): this build props looks outdated, since we only use $(FSharpTestCompilerVersion) in TP tests or cambridge suite (which we slowly want to migrate to xUnit). |
| 65 | + We probably should remove or revisit it. --> |
| 66 | + <Import Project="FSharpTests.Directory.Build.props" Condition=" '$(FSharpTestCompilerVersion)' != '' " /> |
42 | 67 |
|
43 | 68 | <ItemGroup>
|
44 | 69 | <!-- If there is a README.md next to a project file, include it (for easier access in the IDE) -->
|
|
0 commit comments