|
3 | 3 | <_MicrosoftNetSdkWindowsDesktop>true</_MicrosoftNetSdkWindowsDesktop>
|
4 | 4 | </PropertyGroup>
|
5 | 5 |
|
6 |
| - <ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' And '$(UseWPF)' == 'true' And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> |
| 6 | + <PropertyGroup> |
| 7 | + <!-- |
| 8 | + WindowsDesktop SDK supports WPF and WinForms on |
| 9 | + - .NET Core 3.0 and greater |
| 10 | + - .NET Framework 3.0 and greater |
| 11 | + |
| 12 | + Note that on .NET Framework versions < 4.0, additional workarounds may be required to build applications |
| 13 | + using the SDK style projects. For e.g., see https://github.com/microsoft/msbuild/issues/1333 |
| 14 | + |
| 15 | + Irrespective of whether '$(TargetFrameworkIdentifier)' is '.NETCoreApp' or '.NETFramework', |
| 16 | + the minimum value of $(_TargetFrameworkVersionWithoutV) we will be testing for is '3.0' |
| 17 | + |
| 18 | + Note: |
| 19 | + Please see https://github.com/microsoft/msbuild/issues/3212 for a discussion about the use of |
| 20 | + the private $(_TargetFrameworkVersionWithoutV) property - which will likely remain supported and |
| 21 | + is safe to use here. |
| 22 | + --> |
| 23 | + <_WindowsDesktopSdkTargetFrameworkVersionFloor>3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor> |
| 24 | + </PropertyGroup> |
| 25 | + |
| 26 | + <ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' And '$(UseWPF)' == 'true' And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
7 | 27 | <ApplicationDefinition Include="App.xaml"
|
8 | 28 | Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/App.xaml') And '$(MSBuildProjectExtension)' == '.csproj'">
|
9 | 29 | <Generator>MSBuild:Compile</Generator>
|
|
34 | 54 | Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And '$(EnableDefaultPageItems)' != 'false'" />
|
35 | 55 | </ItemGroup>
|
36 | 56 |
|
37 |
| - <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' == 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> |
| 57 | + <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' == 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
38 | 58 | <FrameworkReference Include="Microsoft.WindowsDesktop.App" IsImplicitlyDefined="true" />
|
39 | 59 | </ItemGroup>
|
40 | 60 |
|
41 |
| - <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> |
| 61 | + <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
42 | 62 | <FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" IsImplicitlyDefined="true" />
|
43 | 63 | </ItemGroup>
|
44 | 64 |
|
45 |
| - <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' != 'true') And ('$(UseWindowsForms)' == 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> |
| 65 | + <ItemGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(UseWPF)' != 'true') And ('$(UseWindowsForms)' == 'true') And ('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
46 | 66 | <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" />
|
47 | 67 | </ItemGroup>
|
48 | 68 |
|
|
66 | 86 | UIAutomationClient, UIAutomationClientSideProviders, UIAutomationProvider, UIAutomationTypes
|
67 | 87 | System.Windows.Controls.Ribbon
|
68 | 88 |
|
69 |
| - Note: |
70 |
| - Please see https://github.com/microsoft/msbuild/issues/3212 for a discussion about the use of |
71 |
| - the private $(_TargetFrameworkVersionWithoutV) property - which will likely remain supported and |
72 |
| - is safe to use here. |
| 89 | + Note: |
| 90 | + These are WPF specific version lower-bounds. Do not use $(_WindowsDesktopSdkTargetFrameworkVersionFloor) in place of '3.0' below. |
73 | 91 | -->
|
74 |
| - <ItemGroup Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> |
| 92 | + <ItemGroup Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> |
75 | 93 | <_WpfCommonNetFxReference Include="WindowsBase" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" />
|
76 | 94 | <_WpfCommonNetFxReference Include="PresentationCore" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" />
|
77 | 95 | <_WpfCommonNetFxReference Include="PresentationFramework" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" />
|
|
87 | 105 | <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.5'" />
|
88 | 106 | </ItemGroup>
|
89 | 107 |
|
90 |
| - <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0') And ('$(UseWPF)' == 'true') "> |
| 108 | + <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)') And ('$(UseWPF)' == 'true') "> |
91 | 109 | <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" />
|
92 | 110 | </ItemGroup>
|
93 | 111 |
|
94 |
| - <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0') And ('$(UseWindowsForms)' == 'true') "> |
| 112 | + <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)') And ('$(UseWindowsForms)' == 'true') "> |
95 | 113 | <_SDKImplicitReference Include="System.Windows.Forms"/>
|
96 | 114 | </ItemGroup>
|
97 | 115 |
|
98 |
| - <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0') And ('$(UseWindowsForms)' == 'true') And ('$(UseWPF)' == 'true') "> |
| 116 | + <ItemGroup Condition=" ('$(DisableImplicitFrameworkReferences)' != 'true') And ('$(TargetFrameworkIdentifier)' == '.NETFramework') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)') And ('$(UseWindowsForms)' == 'true') And ('$(UseWPF)' == 'true') "> |
99 | 117 | <_SDKImplicitReference Include="WindowsFormsIntegration"/>
|
100 | 118 | </ItemGroup>
|
101 | 119 | </Project>
|
0 commit comments