Issues no longer appear in IDE

Hi

My information

  • Operating system: Windows 11
  • Visual Studio version: Microsoft Visual Studio Professional 2022 (64-bit) Version 17.13.5
  • SonarQube for Visual Studio plugin version: 8.14.0.12562
  • Programming language you’re coding in: C++
  • Is connected mode used: Yes
    • SonarQube Server: v2025.1.1 (104738)

SonarLint in Visual studio does not show any SonarQube issues.
I tried creating a empty project and this is what the log shows:

Initializing the telemetry package...
Finished initializing the telemetry package...
Initializing the daemon package...
[Connection Migration] The connections.json file already exists. Migrating connections from existing bindings was not performed
Current VS version:
    Visual Studio Professional 2022
    17.13.35919.96
    17.13.5
[SLCoreHandler] Creating SLCore instance
[SLCoreHandler] Starting SLCore instance
Settings file does not exist at "C:\Users\kniels\AppData\Roaming\SonarLint for Visual Studio\settings.json".
Default settings will be used
[NodeJSLocator] Checking environment variable SONAR_NODEJS_PATH
[NodeJsLocator] Environment variable is not set
Finished initializing the daemon package.
[SLCore] Can't open directory channel. Log directory fsync won't be performed.
Solution/folder is not in a git repository
[Connected Mode > Shared Binding] The shared binding configuration file was not found and will not be used. Probed path: not found
Updated analysis readiness: True
[SLCoreAnalyzer] Analyzing C:\Users\kniels\source\repos\Testing\ConsoleApplication3\ConsoleApplication3\main.cpp with id ff2da8c4-f657-4339-b38c-286c5171b1bf
Initializing the notifications package...
Not connected: not checking for notifications
Finished initializing the notifications package
[Connected Mode > Shared Binding] The shared binding configuration file was not found and will not be used. Probed path: not found
"ClCompilerPath" was not found.
"CLToolExe" was not found, falling back to cl.exe.
C:\Program Files\BullseyeCoverage\bin\cl.exe
[CFamily Analysis] Error retrieving VCX configuration. File: C:\Users\kniels\source\repos\Testing\ConsoleApplication3\ConsoleApplication3\main.cpp, Error: Microsoft.VisualStudio.ProjectSystem.ProjectException: The "CL" rule is missing the "PrecompiledHeader" property.
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorUtilities.ThrowProjectExceptionHelper(Exception innerException, String unformattedMessage, Object[] args)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorUtilities.ThrowProjectException(String message, Object arg0, Object arg1)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorUtilities.ThrowRulePropertyMissing(ConfiguredProject configuredProject, String ruleName, String propertyName, String fileName, String itemType, String itemName)
   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCRulePropertyStorage.<>c__DisplayClass5_0.<<GetEvaluatedPropertyValue>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.<>c__DisplayClass9_0`1.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at SonarLint.VisualStudio.Integration.Vsix.CFamily.VcxProject.CmdBuilder.AddOptFromProperties(IVCRulePropertyStorage properties)
   at SonarLint.VisualStudio.Integration.Vsix.CFamily.VcxProject.FileConfig.TryGet(ILogger logger, ProjectItem dteProjectItem, String absoluteFilePath, IFileSystem fileSystem)
   at SonarLint.VisualStudio.Integration.Vsix.CFamily.VcxProject.FileConfigProvider.GetInternal(String analyzedFilePath, DTE2 dte)
[SLCoreAnalyzer] No compilation database found for file: C:\Users\kniels\source\repos\Testing\ConsoleApplication3\ConsoleApplication3\main.cpp. Check that the file is part of a supported project type in the current solution.
[SLCore] Node.js could not be automatically detected, has to be configured manually in the SonarLint preferences!
[SLCore] Failed to recover to valid root, address = 42907710, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42859235, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42810368, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42758403, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42702700, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42643539, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42581632, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42513832, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42498416, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42480532, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42464491, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42448450, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42432409, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42406807, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42386035, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42316704, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42296480, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42275797, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42206321, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42185484, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42162177, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42091800, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42064695, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42044448, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42022893, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 42003099, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 41983305, file = 00000001800.xd
[SLCore] Failed to recover to valid root, address = 41960620, file = 00000001800.xd
[SLCore] Unexpected error occurred in scheduled task
[SLCoreAnalyzer] Finished analyzing C:\Users\kniels\source\repos\Testing\ConsoleApplication3\ConsoleApplication3\main.cpp with id ff2da8c4-f657-4339-b38c-286c5171b1bf, analysis time: 3,243s

So It looks like it is analyzing something just not showing anything.
I have tried removed the entire TFSTemp and .sonarlint folders.

/Kennet

Hi @Kennet

SonarQube for IDE can execute multiple analyzers per file. A typical scenario for a C/C++ file would be C/C++ analysis + secrets analysis. You may see that analysis is executed without any results because we still execute it even if one of the languages is missing the necessary configuration.

In your particular case there’s a problem with getting the file/project properties from your vcxproj, which are needed by our C/C++ analyzer to run properly.

Does this happen only for this project? Do other C/C++ files from other projects in your current solution get analyzed correctly? Do you have other C/C++ solutions, does analysis work there?

One way to test it is to add a simple //todo comment somewhere in your code, which should raise an issue on that line.

If it is something that only happens for this particular project, could you please provide the source code to us for debugging purposes?

Hi

Thanks for you reply.

No

I only have one project in the solution. So not sure but I guess it would be the same.

No, I have tried with different solutions.

If I just create a new “hello world” windows console application I am not getting any warnings after adding this c++ code:

int main()
{
    std::cout << "Hello World!\n";

    //TODO: testing
    new char[100];
    /*
    int y = 0;
    */
}

I can’t reproduce the problem. Judging by the fact that the analysis is not working for all solutions on your PC, it seems to be a problem with compiler/IDE configuration.

Could you please check that the compiler here was chosen correctly?

From your logs:

"ClCompilerPath" was not found.
"CLToolExe" was not found, falling back to cl.exe.
C:\Program Files\BullseyeCoverage\bin\cl.exe