From 2409813af18b71c7c8caf8fafbc1b89259872840 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Wed, 19 Jun 2019 13:34:53 -0700 Subject: [PATCH 1/5] Update global.json tools.dotnet, and dependencies --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index d35b44f4e5b..7e462b908b7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "3.0.100-preview6-012264", + "dotnet": "3.0.100-preview7-012512", "runtimes": { "dotnet": [ "2.1.7", From 9299ede88a773e76b76b58bf8ea681b110ea95b7 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Wed, 19 Jun 2019 17:16:22 -0700 Subject: [PATCH 2/5] Fixes the following: - #685: Remove **/*.xaml from None - #327: Cannot multi-target netcoreap < 3.0 and use WindowsDesktop SDK unconditionally. - #867: Show error when neither UseWpf nor UseWindowsForms is set to true - #746: [Epic] Support WPF and WinForms specific FrameworkReferences a Profiles Also cleans up the way in which we import Microsoft.WinFX.targets - UseLegacyPresentationBuildTasks has been broken for some time now and unusable. --- .../Microsoft.NET.Sdk.WindowsDesktop.props | 36 ++++++++------ .../Microsoft.NET.Sdk.WindowsDesktop.targets | 48 ++++++++++++------- 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props index ffc525ac3f5..c4d92c4c691 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props @@ -2,8 +2,8 @@ <_MicrosoftNetSdkWindowsDesktop>true - - + + MSBuild:Compile @@ -13,28 +13,36 @@ MSBuild:Compile - - MSBuild:Compile - + + + - + - + - + @@ -63,7 +71,7 @@ the private $(_TargetFrameworkVersionWithoutV) property - which will likely remain supported and is safe to use here. --> - + <_WpfCommonNetFxReference Include="WindowsBase" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationCore" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationFramework" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> @@ -79,15 +87,15 @@ <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.5'" /> - + <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" /> - + <_SDKImplicitReference Include="System.Windows.Forms"/> - + <_SDKImplicitReference Include="WindowsFormsIntegration"/> diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets index 0d4999b49ca..7a5bb189480 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets @@ -1,20 +1,8 @@ - - - - - - - + + + + @@ -25,9 +13,10 @@ - + Condition="('$(UseWPF)' == 'true') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"> + + + + + + + + + From 5db998a8b2f145588a8716a083316cb0b47eec9c Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Fri, 21 Jun 2019 09:16:52 -0700 Subject: [PATCH 3/5] - Improve comments and in-place documentation - Make the condition in _WindowsDesktopFrameworkRequiresUseWpfOrUseWindowsForms specific to applicable TFM's --- .../Microsoft.NET.Sdk.WindowsDesktop.props | 42 +++++++++++++------ .../Microsoft.NET.Sdk.WindowsDesktop.targets | 14 +++---- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props index c4d92c4c691..dfd6ed92ba5 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props @@ -3,7 +3,27 @@ <_MicrosoftNetSdkWindowsDesktop>true - + + + <_WindowsDesktopSdkTargetFrameworkVersionFloor>3.0 + + + MSBuild:Compile @@ -34,15 +54,15 @@ Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And '$(EnableDefaultPageItems)' != 'false'" /> - + - + - + @@ -66,12 +86,10 @@ UIAutomationClient, UIAutomationClientSideProviders, UIAutomationProvider, UIAutomationTypes System.Windows.Controls.Ribbon - Note: - Please see https://github.com/microsoft/msbuild/issues/3212 for a discussion about the use of - the private $(_TargetFrameworkVersionWithoutV) property - which will likely remain supported and - is safe to use here. + Note: + These are WPF specific version lower-bounds. Do not use $(_WindowsDesktopSdkTargetFrameworkVersionFloor) in place of '3.0' below. --> - + <_WpfCommonNetFxReference Include="WindowsBase" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationCore" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationFramework" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> @@ -87,15 +105,15 @@ <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.5'" /> - + <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" /> - + <_SDKImplicitReference Include="System.Windows.Forms"/> - + <_SDKImplicitReference Include="WindowsFormsIntegration"/> diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets index 7a5bb189480..7079596b72e 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets @@ -1,8 +1,7 @@ - - - + + @@ -16,7 +15,7 @@ + Condition="('$(UseWPF)' == 'true') And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> - + Condition="'$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'"> + + Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' < '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'"> From d368c8f0a89f62e454b317b6119560eb50c11c15 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Fri, 21 Jun 2019 10:53:55 -0700 Subject: [PATCH 4/5] Organizing conditions in ItemGroups --- .../Microsoft.NET.Sdk.WindowsDesktop.props | 48 +++++++++++-------- .../Microsoft.NET.Sdk.WindowsDesktop.targets | 8 ++-- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props index dfd6ed92ba5..f28cd2f7f56 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props @@ -23,7 +23,8 @@ <_WindowsDesktopSdkTargetFrameworkVersionFloor>3.0 - + MSBuild:Compile @@ -54,17 +55,22 @@ Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And '$(EnableDefaultPageItems)' != 'false'" /> - - - + + - - - + + + - - + + - + <_WpfCommonNetFxReference Include="WindowsBase" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationCore" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> <_WpfCommonNetFxReference Include="PresentationFramework" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> @@ -105,15 +112,16 @@ <_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.5'" /> - - <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" /> - - - - <_SDKImplicitReference Include="System.Windows.Forms"/> - - - - <_SDKImplicitReference Include="WindowsFormsIntegration"/> + + + <_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" + Condition="'$(UseWPF)' == 'true'"/> + + <_SDKImplicitReference Include="System.Windows.Forms" + Condition="('$(UseWindowsForms)' == 'true') " /> + + <_SDKImplicitReference Include="WindowsFormsIntegration" + Condition=" ('$(UseWindowsForms)' == 'true') And ('$(UseWPF)' == 'true') "/> diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets index 7079596b72e..8beb86feab2 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets @@ -1,7 +1,8 @@ - + @@ -43,7 +44,7 @@ --> + Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> @@ -56,7 +57,8 @@ --> + Condition="('$(TargetFrameworkIdentifier)' == '.NETCoreApp') And + ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' < '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)')"> From 0aa98ff212b2400a1e90c24802ea3164b5272ae8 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Fri, 21 Jun 2019 11:41:28 -0700 Subject: [PATCH 5/5] Removing redundant conditions --- .../Microsoft.NET.Sdk.WindowsDesktop.props | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props index f28cd2f7f56..985437424fe 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props @@ -91,15 +91,21 @@ .NET 4.5+: PresentationCore, PresentationFramework, WindowsBase, System.Xaml, UIAutomationClient, UIAutomationClientSideProviders, UIAutomationProvider, UIAutomationTypes System.Windows.Controls.Ribbon - - Note: - These are WPF specific version lower-bounds. Do not use $(_WindowsDesktopSdkTargetFrameworkVersionFloor) in place of '3.0' below. + --> - <_WpfCommonNetFxReference Include="WindowsBase" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> - <_WpfCommonNetFxReference Include="PresentationCore" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> - <_WpfCommonNetFxReference Include="PresentationFramework" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '3.0'" /> + + + <_WpfCommonNetFxReference Include="WindowsBase" /> + <_WpfCommonNetFxReference Include="PresentationCore" /> + <_WpfCommonNetFxReference Include="PresentationFramework" /> <_WpfCommonNetFxReference Include="System.Xaml" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '4.0'"> 4.0