-
Notifications
You must be signed in to change notification settings - Fork 4k
/
TargetFrameworks.props
67 lines (61 loc) · 2.73 KB
/
TargetFrameworks.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
This props file manages the target framework properties for Roslyn. The strategy for these properties
is convered in "docs/contributing/Target Framework Strategy.md". Please see that for documentation
on what these values mean.
Requirements:
- NetVSShared must include both NetVS and NetVSCode
- NetRoslynSourceBuild must include NetRoslynToolset
- NetRoslynAll must include all .NET Core TFMS in any property below
-->
<PropertyGroup>
<NetRoslyn>net8.0</NetRoslyn>
<NetRoslynAll>net7.0;net8.0</NetRoslynAll>
<NetVS>net8.0</NetVS>
<NetVSCode>net7.0</NetVSCode>
<NetVSShared>net7.0;net8.0</NetVSShared>
</PropertyGroup>
<!--
There are effectively three modes that are needed for our source build TFMs and this is where
we calculate them
-->
<Choose>
<!--
1. CI source build leg: this needs to build the current and previous source build TFM. Both are
necessary as the output of this leg is used in other CI source build legs. Those could be
targeting NetCurrent or NetPrevious hence we must produce both.
However the toolset package we produce must target NetPrevious. This package gets used as the
bootstrap toolset in other repos doing (1). Those can be using a NetPrevious runtime hence
the toolset must support that.
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product'">
<PropertyGroup>
<NetRoslynToolset>$(NetPrevious)</NetRoslynToolset>
<NetRoslynSourceBuild>$(NetCurrent);$(NetPrevious)</NetRoslynSourceBuild>
<NetRoslynAll>$(NetCurrent);$(NetPrevious)</NetRoslynAll>
</PropertyGroup>
</When>
<!--
2. Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
<PropertyGroup>
<NetRoslynToolset>$(NetCurrent)</NetRoslynToolset>
<NetRoslynSourceBuild>$(NetCurrent);$(NetPrevious)</NetRoslynSourceBuild>
<NetRoslynAll>$(NetCurrent);$(NetPrevious)</NetRoslynAll>
</PropertyGroup>
</When>
<!--
3. Everything else including normal CI, developer machines and official builds. This brings in enough
TFM that source build will go smoothly but doesn't bring in all source build TFMs to avoid adding
too many extra compiles to our builds
-->
<Otherwise>
<PropertyGroup>
<NetRoslynToolset>net8.0</NetRoslynToolset>
<NetRoslynSourceBuild>net7.0;net8.0</NetRoslynSourceBuild>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>