Excludefromcodecoverage attribute not working for vb.net code

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonar Scanner : 4.11.0
  • what are you trying to achieve
    I’m having both C#&VB.Net in the same project.
    I’m trying to exclude some part of vb code using ExcludeFromCodeCoverage attribute but it’s not working
  • what have you tried so far to achieve this
    ExcludeFromCodeCoverage attribute I’ve used for C# code it has worked and excluded that piece of code from code coverage analysis but for VB.Net it is not working as expected

Any update on this?

Hi @krameshsai, welcome to the community.

Do you have a small reproducer project for your problem?

Hi Andrei, thanks for replying
i found a solution by including vb file in sonar.exclusions in my Azure pipeline
hope it helps someone

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