I have implemented a custom BuildTask and set the build engine in it. But while executing the code, I am getting this exception
Method not found: 'Void Microsoft.Build.Utilities.Task.set_BuildEngine(Microsoft
.Build.Framework.IBuildEngine)'.
What can be possible cause of this?
For me, the problem started when I upgraded the build project to use Visual Studio 2015. The build task that was being tested was referencing the
Microsoft.Build.Framework
that was installed into the GAC (4.0.0.0.). I had to set theHintPath
to use theMSBuild 14
version of theMicrosoft.Build.Framework
on the assembly that was being tested as well as the test assembly and that fixed the problem.