I am currently working on a solution with multiple projects in it, and when I try to run the code analysis tool from VS12 I get the following error when trying to run it:
CA0058 Error Running Code Analysis CA0058 : The referenced assembly "Microsoft.Practices.Unity, Version=2.1.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be found. This assembly is required for analysis and was referenced by: C:\MyProject\bin\Release\MyProject.exe, C:\MyProject\packages\Prism.UnityExtensions.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.UnityExtensions.dll. [Errors and Warnings] (Global)
I also got two more erros:
CA0052: No targets were selected
and
CA0055 Error Running Code Analysis CA0055 : C:\MyProject\bin\Release\IntraEUA Management Software 2.0.exe The following error was encountered while reading module "Microsoft.Practices.Prism.UnityExtensions": Assembly reference cannot be resolved: Microsoft.Practices.Unity, Version=2.1.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. [Errors and Warnings] (Global)
But the strange thing is, nowhere in my solution I use ersion 2.1.505.0 of UnityExtensions, I am using 4.1.0.0. And even stranger, in all other projects in this solution it works, using the exact same version of UnityExtensions, even the PublicKeyToken is identical in all the other projects.
I've tried to search the entire solution for the string "2.1.505.0" and found nothing., so where does VS get this Information?
Btw, I got UnityExtension using NuGet. And tried to delete and reinstall UnityExtensions, but with no effect. And I am using .NET 4.5.
Any idea to get rid of this, probably false error? Or at least a workaround to ignore it?