I updated the assembly reference in my build tool to use the latest versions(v12) of microsoft.build,microsoft.build.engine and microsoft.build.framework. But while compiling a project using the BuildManager(I use the Rebuild option for compilation) it fails at the Target : CleanWebsitesPackageCore with the error MSB4127: " The "CheckPathAttributes" task could not be instantiated from the assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type 'Microsoft.Web.Publishing.Tasks.CheckPathAttributes' to type 'Microsoft.Build.Framework.ITask'".
The interested point to be noted is that if i try to compile the project directly by calling MSBuild.exe from the command prompt it compiles fine. While looking at the logs I could see that the target "CleanWebsitesPackageCore" was never getting called during the "clean" part. Wonder why the target gets called when using buildmanager and not while calling msbuild.exe directly on command prompt ?
Anybody has any idea why this is happening like this. Thanks in advance.