WPF MSBuild is failed with Microsoft.Toolkit.Wpf.UI.XamlHost #357
Description
I am using Microsoft.Toolkit.Wpf.UI.XamlHost nuget package in my WPF project for accessing UWP UI element in WPF.
I am able to Build and Run the project from Visual Studio 2019.
But Build is failed in Azure Pipeline.
I am getting below error.
C:\Users\svc_build_ado.nuget\packages\microsoft.toolkit.win32.ui.sdk\6.1.2\build\Microsoft.WinRT.Win32.targets(207,5): error MSB4801: The task factory "CodeTaskFactory" is not supported on the .NET Core version of MSBuild. [F:\builds\agent8_work\1\s\WPFApp.csproj]
C:\Users\svc_build_ado.nuget\packages\microsoft.toolkit.win32.ui.sdk\6.1.2\build\Microsoft.WinRT.Win32.targets(207,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "F:\builds\agent8_work_tool\dotnet\sdk\3.1.200\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property. [F:\builds\agent8_work\1\s\WPFApp.csproj]
Any Ideas on this issue.
Activity