|
15 | 15 | using the SDK style projects. For e.g., see https://github.com/microsoft/msbuild/issues/1333 |
16 | 16 | |
17 | 17 | Irrespective of whether '$(TargetFrameworkIdentifier)' is '.NETCoreApp' or '.NETFramework', |
18 | | - the minimum value of $(_TargetFrameworkVersionWithoutV) we will be testing for is '3.0' |
| 18 | + the minimum value of $(_TargetFrameworkVersionValue) we will be testing for is '3.0' |
19 | 19 | |
20 | | - Note: |
21 | | - Please see https://github.com/microsoft/msbuild/issues/3212 for a discussion about the use of |
22 | | - the private $(_TargetFrameworkVersionWithoutV) property - which will likely remain supported and |
23 | | - is safe to use here. |
24 | 20 | --> |
25 | 21 | <_WindowsDesktopSdkTargetFrameworkVersionFloor>3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor> |
| 22 | + |
| 23 | + <!-- |
| 24 | + Represents an undefined TFV value. This will be used in comparisons of _TargetFrameworkVersionValue (defined in Microsoft.NET.WindowsDesktop.targets) |
| 25 | + to identify when a TFV is undefined |
| 26 | + --> |
| 27 | + <_UndefinedTargetFrameworkVersion>0.0</_UndefinedTargetFrameworkVersion> |
| 28 | + |
| 29 | + <!-- |
| 30 | + Initial/Default value set to 'undefined'. Updated in Microsoft.NET.WindowsDesktop.targets |
| 31 | + --> |
| 32 | + <_TargetFrameworkVersionValue>$(_UndefinedTargetFrameworkVersion)</_TargetFrameworkVersionValue> |
26 | 33 | </PropertyGroup> |
27 | 34 |
|
28 | 35 | <ItemGroup Condition=" ('$(EnableDefaultItems)' == 'true') And ('$(UseWPF)' == 'true') And |
29 | | - ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
| 36 | + ('$(_TargetFrameworkVersionValue)' != '$(_UndefinedTargetFrameworkVersion)') And |
| 37 | + ('$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
30 | 38 | <ApplicationDefinition Include="App.xaml" |
31 | 39 | Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/App.xaml') And '$(MSBuildProjectExtension)' == '.csproj'"> |
32 | 40 | <Generator>MSBuild:Compile</Generator> |
|
60 | 68 |
|
61 | 69 | <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And |
62 | 70 | ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And |
63 | | - ('$(_TargetFrameworkVersionWithoutV)' != '') And |
64 | | - ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
| 71 | + ('$(_TargetFrameworkVersionValue)' != '$(_UndefinedTargetFrameworkVersion)') And |
| 72 | + ('$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
65 | 73 |
|
66 | 74 | <FrameworkReference Include="Microsoft.WindowsDesktop.App" IsImplicitlyDefined="true" |
67 | 75 | Condition="('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' == 'true')"/> |
|
95 | 103 | System.Windows.Controls.Ribbon |
96 | 104 |
|
97 | 105 | --> |
98 | | - <ItemGroup Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And |
99 | | - ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
| 106 | + <ItemGroup Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') And |
| 107 | + ('$(_TargetFrameworkVersionValue)' != '$(_UndefinedTargetFrameworkVersion)') And |
| 108 | + ('$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
100 | 109 |
|
101 | 110 | <!-- |
102 | | - The following 3 _WpfCommonNetFxReference items normally require Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'", since |
| 111 | + The following 3 _WpfCommonNetFxReference items normally require Condition="'$(_TargetFrameworkVersionValue)' >= '3.0'", since |
103 | 112 | they are supported on .NET Framework 3.0 and above. |
104 | 113 | |
105 | | - This condition is implicitly satisfied by '$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)' |
| 114 | + This condition is implicitly satisfied by '$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)' |
106 | 115 | in the outer ItemGroup |
107 | 116 | --> |
108 | 117 | <_WpfCommonNetFxReference Include="WindowsBase" /> |
109 | 118 | <_WpfCommonNetFxReference Include="PresentationCore" /> |
110 | 119 | <_WpfCommonNetFxReference Include="PresentationFramework" /> |
111 | 120 |
|
112 | | - <_WpfCommonNetFxReference Include="System.Xaml" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'"> |
| 121 | + <_WpfCommonNetFxReference Include="System.Xaml" Condition="'$(_TargetFrameworkVersionValue)' >= '4.0'"> |
113 | 122 | <RequiredTargetFramework>4.0</RequiredTargetFramework> |
114 | 123 | </_WpfCommonNetFxReference> |
115 | | - <_WpfCommonNetFxReference Include="UIAutomationClient" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'" /> |
116 | | - <_WpfCommonNetFxReference Include="UIAutomationClientSideProviders" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'" /> |
117 | | - <_WpfCommonNetFxReference Include="UIAutomationProvider" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'" /> |
118 | | - <_WpfCommonNetFxReference Include="UIAutomationTypes" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'" /> |
| 124 | + <_WpfCommonNetFxReference Include="UIAutomationClient" Condition="'$(_TargetFrameworkVersionValue)' >= '4.0'" /> |
| 125 | + <_WpfCommonNetFxReference Include="UIAutomationClientSideProviders" Condition="'$(_TargetFrameworkVersionValue)' >= '4.0'" /> |
| 126 | + <_WpfCommonNetFxReference Include="UIAutomationProvider" Condition="'$(_TargetFrameworkVersionValue)' >= '4.0'" /> |
| 127 | + <_WpfCommonNetFxReference Include="UIAutomationTypes" Condition="'$(_TargetFrameworkVersionValue)' >= '4.0'" /> |
119 | 128 |
|
120 | | - <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.5'" /> |
| 129 | + <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionValue)' >= '4.5'" /> |
121 | 130 | </ItemGroup> |
122 | 131 |
|
123 | | - <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And |
124 | | - ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
| 132 | + <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And |
| 133 | + ('$(TargetFrameworkIdentifier)' == '.NETFramework') And |
| 134 | + ('$(_TargetFrameworkVersionValue)' != '$(_UndefinedTargetFrameworkVersion)') And |
| 135 | + ('$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
125 | 136 |
|
126 | 137 | <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" |
127 | 138 | Condition="'$(UseWPF)' == 'true'"/> |
|
153 | 164 | Detect these situations and skip updates to @(SupportedTargetFramework) etc. |
154 | 165 | --> |
155 | 166 | <ItemGroup Condition="('$(UseWPF)' == 'true' Or '$(UseWindowsForms)' == 'true') And |
156 | | - '$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'"> |
| 167 | + '$(_TargetFrameworkVersionValue)' != '$(_UndefinedTargetFrameworkVersion)' And |
| 168 | + '$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'"> |
157 | 169 |
|
158 | 170 | <!-- |
159 | 171 | Windows Forms and WPF are supported only on .NET Core 3.0+ |
|
0 commit comments