Search code examples
msbuildmsbuild-task

msbuild task error while loading Microsoft.VisualStudio.Coverage.Analysis


I've written a custom task for analyzing code coverage results. While building the entire solution, I get the following error.

error MSB4018: System.IO.FileNotFoundException: Could not load file or 
assembly 'Microsoft.VisualStudio.Coverage.Analysis, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find 
the file specified.

I checked the path specified during the build process and the dll location is correct. Yet, i get a FileNotFoundException.
Am I missing something?
Thanks...


Solution

  • I managed to fix the problem. I had to add the assembly to the GAC using gacutil.exe. The error vanished once the assembly was added.