I use SonarLint. I want the sonar test not to be performed for a specific line. I used // NOSONAR but it didn't work. Does not specify the error number.
The error still appears in SonarLint when I use //NOSONAR. But in the main project (SonarQube) the error no longer appears.

This is Visual Studio suggestion, not SonarLint warning. Also, I believe NOSONAR is not supported in Visual Studio. You can either suppress in source:
Or in suppression file: