How to prevent FxCop from analyzing auto-generated code?

前端 未结 3 1368
-上瘾入骨i
-上瘾入骨i 2021-02-20 11:27

FxCop (tool for static code analysis) gives me an error while checking code behind of .edmx model. How to prevent FxCop from analyzing auto-generated code (or at least Entity Fr

3条回答
  •  青春惊慌失措
    2021-02-20 11:59

    I have moved to Visual Studio Code Analysis, as it gives me the same functionality as FxCop.

    From FxCop blog:

    "That's correct, they are different products (FxCop and VS Code Analysys), however they do have a common engine. Visual Studio 2008 SP1 already comes with the same fixes and analysis (plus a little bit more), so there is no need to 'update' Visual Studio with the latest FxCop."

    But nevertheless Suppress results from generated code option (project properties -> code analysis tab) for some reason does not preventing from code analysis for auto generated code of .edmx model.

    Then I've found blog, which helped me solve this issue.

提交回复
热议问题