Skip to content

Month: October 2020

Visual Studio 2019 and Sitecore (Troubleshooting) error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found

I have a Sitecore solution built for 2017 but just recently got a fresh computer with only Visual Studio 2019 on it. So I’ve been running through some problems.

This was the error I was getting while running gulp to build the solution. I had installed the VS 2017 build tools earlier. Looks like you need to install the NuGet items as well.

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is “public” and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the “C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64” directory