I would recommend stronlgy to go the official route via classes/interfaces in Microsoft.Build
namespace. Microsoft uses this all over the place, so this should count for something…
Esp. the class Microsoft.Build.Execution.BuildManager
and the Singleton Microsoft.Build.Execution.BuildManager.DefaultBuildManager
is what you are after to run a build task… source code examples: