sonarqube c# connected mode not analyzing new projects


April 2019


49 time


I have created a new project in my solution but have not checked the solution onto the branch that connected mode is pointed to. Is it not possible to get code analysis on this new project prior to checking the project/solution back onto the branch that connnected mode is pointed to? I would like to be able to clean up code issues prior to checking the project into the branch.

1 answers


I suspect you want to see issues in SonarLint.

When SonarLint binds a solution (e.g. connects it to SonarQube) it adds references to the SonarAnalyzer.CSharp/VisualBasic nuget packages and disables its built-in code analyzers. When you add new project to a bound solution, the nuget package references are not automatically added and since the built-in analyzers in SonarLint are disabled, you don't see warnings. To add the nuget packages you need to update the bindings of the solution from the Team Explorer pane.