How to fix VS2017 missing XAML tools build error

Typically, when an older project is opened for the first time in the latest version of Visual Studio, the migration manager kicks in and automatically corrects any inconsistencies between Visual Studio versions. However, some other issue may arise. Using the default install of Visual Studio 2017 Community Edition, trying to compile the solution I was working on returned the following error: error description

Taking a closer look at the error: The "Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\XamlBuildTask.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\XamlBuildTask.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.. It looks like there are a few XAML files that need to be compiled. Honestly, I was not familiar with this particular project so I was totally unaware of this dependency.

To solve this issue, modify your Visual Studio Installation (using Visual Studio Installer), in the "Individual components" tabs look for "Windows Workflow Foundation" and select it. VS2017 installer

This might seem like a fairly obvious solution if you traditionally work with XAML or Windows Workflow Foundation. However, since I was not used to either, it took me some time to figure this out. Hopefully this article can help somebody else.