Welcome to Microsoft Q&A!
How did you build your project?
Please try to add the assembly into the global assembly cache:
gacutil /i Microsoft.Build.Utilities.v4.0.dll
Meanwhile, please install the latest version of NuGet.Build.Tasks in package manager:
NuGet\Install-Package NuGet.Build.Tasks -Version 6.4.0
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.