Search code examples
asp.netvb.netwindowsmsbuild-task

Build Task Failed Unexpectedly


I have error in my project

that is

The "ResolveComReference" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.v12.0' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Build.Tasks.v12.0'

Can anyone help me regards this. I got stucked

I am using VS2012 and microsoft office 2007


Solution

  • This problem usually occurs as a result of a multi-program corruption involving Microsoft Visual Studio 2012, other Visual Studio versions, and Microsoft Web Tools for Visual Studio 2012.

    Reinstalling Visual Studio is known to fix it, but however many victims of this issue have said that this doesn't fix the issue.

    Instead copying the files from

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web

    over to

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web

    seems to fix the problem in the majority of similar cases.

    Other possible fixes: