Switch away from using PresentationBuildTasks and Microsoft.WinFx.targets from C:\Windows
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
For WPF projects targeting net472, we should see if it's feasible to use the modern PresentationBuildTasks and Microsoft.WinFx.targets used by modern .NET 6/7/8.
We are already importing Microsoft.WinFx.targets from:
`C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.WinFX.targets`
However that's just a shim that's loading the C:\Windows copy using `$(MSBuildFrameworkToolsPath)\Microsoft.WinFx.targets"`
Modern WPF projects import this file instead:
`C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets at (163;3)`
Should we see if we can import this for desktop too?
This issue is causing an insane amount of pain in our ecosystem.
Related links:
* https://github.com/microsoft/dotnet/issues/1197
* https://github.com/dotnet/msbuild/pull/2701
* https://github.com/dotnet/msbuild/issues/3254
* https://github.com/dotnet/msbuild/issues/3483
* https://github.com/dotnet/sdk/issues/15395
* https://github.com/dotnet/sdk/pull/15465
* https://github.com/dotnet/sdk/pull/15790
* https://github.com/dotnet/sdk/issues/34438
* https://github.com/dotnet/sourcelink/issues/601
* https://github.com/dotnet/wpf/issues/810
* https://github.com/dotnet/wpf/pull/1056
* https://github.com/dotnet/wpf/issues/1718
* https://github.com/dotnet/wpf/issues/3308
* https://github.com/dotnet/wpf/issues/3404
* https://github.com/dotnet/wpf/pull/3585
* https://github.com/dotnet/wpf/pull/3846
* https://github.com/dotnet/wpf/pull/3890
* https://github.com/dotnet/wpf/issues/3963
* https://github.com/dotnet/wpf/issues/3974
* https://github.com/dotnet/wpf/pull/4009
* https://github.com/dotnet/wpf/issues/4067
* https://github.com/dotnet/wpf/issues/4302
* https://github.com/dotnet/wpf/issues/4311
* https://github.com/NuGet/Home/issues/4515
* https://github.com/NuGet/Home/issues/4532
* https://github.com/NuGet/Home/issues/4652
* https://github.com/NuGet/Home/issues/5894
* https://github.com/NuGet/NuGet.Client/pull/1786
Our ecosystem is hurting:
* https://github.com/microsoft/CsWin32/issues/7
* https://github.com/grpc/grpc/pull/22067
* https://github.com/dotnet/Nerdbank.GitVersioning/issues/147
* https://github.com/dotnet/Nerdbank.GitVersioning/issues/175
* https://github.com/dotnet/Nerdbank.GitVersioning/issues/404
* https://github.com/dotnet/Nerdbank.GitVersioning/pull/405
* https://github.com/manuelroemer/Nullable/issues/11
* https://github.com/manuelroemer/Nullable/issues/20
* https://github.com/devlooped/ThisAssembly/issues/14
* https://github.com/dotnet/wpf/issues/9579
* https://github.com/dotnet/roslyn-sdk/pull/94
* https://github.com/dotnet/roslyn-sdk/issues/647
* https://github.com/dotnet/roslyn-tools/issues/154
* https://github.com/pakrym/jab/issues/41
* https://github.com/dotnet/roslyn/issues/52427
* https://github.com/canton7/PropertyChanged.SourceGenerator/issues/1
* https://github.com/novotnyllc/MSBuildSdkExtras/pull/27
* https://github.com/novotnyllc/MSBuildSdkExtras/issues/32
* https://github.com/novotnyllc/MSBuildSdkExtras/issues/66
* https://github.com/novotnyllc/MSBuildSdkExtras/pull/68
* https://github.com/reactiveui/ReactiveUI/pull/1587
* https://github.com/dotnet/sourcelink/issues/62
* https://github.com/dotnet/sourcelink/issues/91
Contributor guide
Assessment
This issue has not been assessed yet.