From 443a26eb74567a9d177884b9ea21f4a25ee897cd Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Mon, 31 May 2021 17:34:12 +1000 Subject: [PATCH] Ingest and import Windows Forms analyzer props Provide a mechanism to ingest Windows Forms specific analyzer props and targets into Microsoft.NET.Sdk.WindowsDesktop from Windows Forms transport package, and copy these files into `targets` folder of the SDK, so that the props files are resolved and imported when a developer builds a Windows Forms app. In the end the new props file will end up in a location similar to this: `C:\Program Files\dotnet\sdk\6.0.\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\`. This work relates to https://github.com/dotnet/designs/pull/223, and acts as a workaround until https://github.com/dotnet/designs/pull/181 is approved and implemented. --- ....NET.Sdk.WindowsDesktop.ArchNeutral.csproj | 21 +++++++++++++++++++ .../Microsoft.NET.Sdk.WindowsDesktop.props | 3 +++ .../Microsoft.NET.Sdk.WindowsDesktop.targets | 3 +++ 3 files changed, 27 insertions(+) diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/Microsoft.NET.Sdk.WindowsDesktop.ArchNeutral.csproj b/packaging/Microsoft.NET.Sdk.WindowsDesktop/Microsoft.NET.Sdk.WindowsDesktop.ArchNeutral.csproj index 275fd4a4cb9..bf73415b568 100644 --- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/Microsoft.NET.Sdk.WindowsDesktop.ArchNeutral.csproj +++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/Microsoft.NET.Sdk.WindowsDesktop.ArchNeutral.csproj @@ -20,9 +20,30 @@ WindowsDesktop SDK + + <_WinFormsNuGetPath>$(PkgMicrosoft_Private_Winforms) + <_WinFormsContentPath>$(_WinFormsNuGetPath)\Wpf.Sdk.WindowsDesktop\* + + + + + + + + + + + <_WinFormsContent Include="$(_WinFormsContentPath)" /> + + + + + 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 fd610f3ac50..defea24c22f 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 @@ -171,4 +171,7 @@ false + + + 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 edadf38f4b3..7634aae5edb 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 @@ -155,4 +155,7 @@ + + +