When building WPF projects targeting net4x TFM and using the WindowsDesktop SDK in Visual Studio or MSBuild, legacy PresentationBuildTasks.dll (i.e, the one that shipped with .NET Framework, and installed in GAC) is used for Markup Compilation.
This behavior is wrong - and not what is intended. The correct behavior is to use the copy of PresentationBuildTasks.dll that ships with the .NET Core SDK under 3.0.100\SDKs\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\PresentationBuildTasks.dll
Repro:
# Launch Visual Studio 2019 Developer Command Prompt
dotnet new globaljson --sdk-version 3.0.100
dotnet new wpf --target-framework-override net472
msbuild /bl
// Inspect the logs; Search for $task MarkupCompilePass1
// Observed: PresentationBuildTasks, Version 4.0.0.0 is used from the .NET Framework GAC
// Expected: 3.0.100\SDKs\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\PresentationBuildTasks.dll from .NET Core 3.0 SDK should be used
When building WPF projects targeting net4x TFM and using the WindowsDesktop SDK in Visual Studio or MSBuild, legacy
PresentationBuildTasks.dll(i.e, the one that shipped with .NET Framework, and installed in GAC) is used for Markup Compilation.This behavior is wrong - and not what is intended. The correct behavior is to use the copy of PresentationBuildTasks.dll that ships with the .NET Core SDK under
3.0.100\SDKs\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\PresentationBuildTasks.dllRepro: