Problem with sonar scanner .NEt Msbuild - not analize some lenguages

I having a problem with one .net project, that have 42.000 LoC, and when its passing from Azure Devops 2019(TFS) To SonarQube , only Recognizes 2 of 4 technologies, only have pass it c# and Css, but javascript and html don’t, lefting me with 1.000 LoC only analized,

This project is working on Framework 4.5 , and i dont have exclusions

the question is Why isnt analyze all the code , why its excluding the javascrit and html files?

has to do with the version of sonarqube 7.9.1 and updates of scanners?

the version of sonarqube we have is 7.9.1 , please help me aout to find a solution

Thanks in advance

Hi Luis

If this is an old style (pre-sdk) project file you will need to specifically add a reference to the other files to be analysed. If you look at the Analyzing languages other than C# and VB section here, it explains how to do that.

Hope that helps

Tom

2 Likes

Hi, thanks for the answer, but im reviewving that passed it trhought SonarQube and i can see .js files and .aspx files but not counting the lines and that is so strange this behaviour

i reviewed the .csproject and i can see all the files included inside ItemGroup with xml markup Content of each files, that is correct, and that is why i can see them i the tab Code in project of sonarqube

what else i have to review to solve this issue?

Thanks in advance

I confirm that im working in a .Net Project with Framework 4.5 , and according to the documentation is an old style project, but in the csproject i have all the files referenceded

I have found , that not only not analize js, html files, some .cs is not reading the lines or not analize, som help here please¿?

Hi Luis

Sorry that you are still having a problem with this. Could you share your logs (with any sensitive information removed) and we will try and take a look?

Thanks

Tom

1 Like

Thanks Luis, I’ve had a look through your files but can’t find the Azure Devops Compilation Logs? (which are what I need)

Tom

Hello, thanks for the message, we are gonna update the SonarQube to last LTS version

and we are gonna test if its that

thanks for everything , greetings

1 Like

Hello, we update to the LTS version, but the problem still got it, SonarQube not recongnize all the lines of code, only some , and i need help to solve this issue

also i wanna ask about , the technical debt increase in some projects i dont know why ocurrs this can you explain me?

Hello i already resolve the issue i founded that two of my projects were “test project” and i read this article of yours → “DotNet: upcoming changes to how we detect test projects in Solution”, in this article explain how to resolve

thanks in advance

Good to hear you found the problem Luis

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.