Can't build in visual studio 2015 because 'Microsoft.Build.Tasks.v14.0.dll' cannot be found

When attempting to build in visual studio 2015, the following file is missing? This project was previously being built in VS2013.

Severity Code Description Project File Line Error The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v14.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v14.0.dll' or one of its dependencies. The system cannot find the file specified.


The assembly has been renamed. Change on the CodeTaskFactory MSBuild Task the AssemblyFile parameter to...(in your error there should be a targets file name where this task resides)

AssemblyFile="C:\Program Files (x86)\MSBuild\14.0\Bin\Microsoft.Build.Tasks.Core.dll"

Chances are someone tried to be clever and use an MSBuild property like this..(which doesn't work for MSBuild 14 but would for 12)...

AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll"

Just fyi...There are some others as well such as Microsoft.Build.Utilities.v12.0.dll has been renamed to Microsoft.Build.Utilities.Core.dll


What helped me with Visual Studio 2017 is to copy Microsoft.Build.Tasks.Core.dll and rename it to Microsoft.Build.Tasks.v15.0.dll build.tasks.v15.0.dll