74

In Visual Studio 2013, I used the Code Analysis window to provide reports to both the Development and Management teams.

Code Analysis window in Visual Studio 2013

In Visual Studio 2015 Enterprise RTM, these errors have returned to the error window and I can no longer just see CA issues for a single project, or filter them by type.

Is there a way to bring the Code Analysis window back?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
NikolaiDante
  • 18,469
  • 14
  • 77
  • 117

1 Answers1

90

Visual Studio Code Analysis has been merged with Intellisense and can now be viewed from the Error window. When you select "Build+Intellisense" or "Intellisense" your code analysis warnings will show up there. You no longer need to build your solution to see them there.

This is one of the perks of the new Roslyn based editor.

enter image description here

Setting it to Intellisense Only should show you your code Analysis Warnings and on the left there is now an option to select "Entire Solution", "Current Project", "Current Document" or "Open documents".

I personally really like the last option, as it works really well for people wanting to leave the campground cleaner than they found it.

If you add additional analyzers (through a vsix or Nuget), they show up as additional rules for Code Analysis.

You can add the "Category" column: enter image description here

And then filter by category: enter image description here

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 5
    if using MS Code rules, the vast majority of the code analysis results appear in the "Build" section, not "Intellisense". in fact, selecting from the menu Analyze > Run Code Analysis... appears to be doing little more than running a "Build" command – nicholas Dec 08 '15 at 17:34
  • Corrent, the old "Binary Code Analysis" rules still depend on fxcopcmd and ere calculated during build (and as such fall under the build category, unfortunately). – jessehouwing Dec 08 '15 at 21:35
  • 2
    I'm using VS2015U2 and ran analysis. I see about 10 messages in the text-based Output window, but the Error List window is completely empty (and all filters disabled). – Dai Jun 12 '16 at 00:27
  • Am I the only one missing the "explanation" window? Where'd that go? I haven't seen it since 2013. Code analysis used to walk me through step by step what it thinks. – Alexander Riccio Dec 03 '21 at 23:21
  • I *think* I fixed it with this workaround: https://developercommunity.visualstudio.com/t/code-analysis-errors-are-not-listed-in-the-error-l/1171684#T-N1300748 – Alexander Riccio Dec 03 '21 at 23:45