To complement @ganncamp answer, note that if this is .Net code then you should be using the Scanner for MSBuild. The latter is tightly integrated with your Visual Studio project definition, and files analyzed are closely tied to files declared/built in your solution. (I suggest studying the above doc and reviewing logs if you wish to understand more in depth)