I suspect it was due to the Solution file being in a subfolder but I was not able to reproduce your problem. Could you please enable verbose logs and share them with us?
Hello. Thanks for your getting involved. I thought my post would be abandoned.
Analysing 'Program.cs'...
Starting analysis with configuration:
[
baseDir: C:\Users\USER\repo\XYZ\backend\build
extraProperties: {sonar.cs.internal.solutionPath=C:\Users\USER\repo\XYZ\backend\build\a.sln, sonar.cs.internal.dotnetCliExeLocation=C:\Program Files\dotnet\dotnet.exe, sonar.cs.internal.msBuildPath=C:\Program Files\dotnet\sdk\7.0.102}
moduleKey: Module: 'rider.module'
excludedRules: []
includedRules: []
ruleParameters: {}
inputFiles: [
file:///C:/Users/USER/repo/XYZ/backend/src/a/Program.cs (UTF-8)
]
]
Start analysis
Index files
1 file indexed
Added 186 checks for language='ts', repository='typescript'
Added 184 checks for language='js', repository='javascript'
'OmniSharp' skipped because there is no related files in the current project
Execute Sensor: HTML
Execute Sensor: TextAndSecretsSensor
1 source file to be analyzed
1/1 source file has been analyzed
'JavaScript/TypeScript analysis' skipped because there is no related files in the current project
'JavaScript inside YAML analysis' skipped because there is no related files in the current project
'JavaScript inside HTML analysis' skipped because there is no related files in the current project
Execute Sensor: CSS Rules
No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
Done in 155ms
Processed 0 issues
Found 0 issues and 0 hotspots
We found the origin of the problem, it’s a regression we introduced in version 8.3 when the solution file is not in the root folder. I created this ticket to fix the problem, I am not sure we have the bandwidth to fix that immediately. You can always revert to the 8.2 via the Marketplace and offline installation while waiting for the fix. The other option would be to put your solution file in the root folder.
Thanks for raising this and sorry for the inconvenience
Almost a year ago the issue was reported and nothing was done toward this.
Could you make this a priority to make sure the location of the solution doesn’t have an impact on the Sonarlint plugin?
I need to stay with the 8.2 version in order to make it work when the newest Sonarlint plugin is 10.6.2.78685
Hello @Tymisko, sorry for the lack of progress on this one.
We are currently refactoring a few SonarLint parts, and I would like to tackle this issue simultaneously. I tried reproducing a similar folder structure as you mentioned, and it’s working on my custom build.
To make sure I’m not missing something, could you please send us a reproducible example (via a git project, for example) so I can assess with certainty that the fix is working? Thank you.
We released SonarLint 10.7, which contains some refactoring regarding this part. We would appreciate any confirmation that the behavior improved. If not, we would like you to provide a reproducible example of where the issue is happening so we can provide an effective fix.