VS2010 Custom Code Analysis Rule

I am trying to write my own fxcop rule for VS2010 mstest projects. I would like to debug it, but keep getting an exception when it tries to load the DLL for the mstest project, which it does not claim that it cannot find the assembly reference:



  
   Microsoft.FxCop.Common.AssemblyLoadException
   Could not load C:\Users\Administrator\Documents\Visual Studio 2010\Projects\20100106-CodeAnalysisRulesBlogDemo\BlogDemo\TestProject1\bin\Debug\TestProject1.dll.
   Microsoft.FxCop.Sdk.InvalidMetadataException
   The following error was encountered while reading module 'TestProject1': Assembly reference cannot be resolved: Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

Does anyone know how to solve this? If I just started the code analysis, it works fine, but as soon as I try to debug it, it doesn't work.

thank

+3
source share
2 answers

You can use the / d option to specify additional directories to search for when resolving builds.

, "-".

+1

FxCop NDepend. , LINQ # , CQLinq. :

200 . - # LINQ.

CQLinq VisualStudio :

CQLinq rules

Visual Studio , HTML + javascript.

0

Source: https://habr.com/ru/post/1737368/


All Articles