SonarScanner扫描VB.NET项目报错:需安装VB支持插件排查求助
Let’s walk through the likely causes and fixes for this error, since you’ve already covered the initial steps (installing the VB.NET plugin, setting up a quality profile, restarting SonarQube, and configuring sonar.language=vb):
Double-check plugin installation and compatibility
Head to your SonarQube instance’sAdministration > Marketplaceand verify the VB.NET plugin is listed as Installed and Enabled. It’s rare, but sometimes plugins don’t auto-enable after a restart—toggle the enable switch if needed, then restart SonarQube again. Also, confirm the plugin version matches your SonarQube server version (check the plugin’s description page for compatibility notes; mismatched versions can cause unexpected detection failures).Review the
sonar.languageconfiguration (critical for newer SonarQube versions)
If you’re running SonarQube 7.9 or later, thesonar.languageparameter is deprecated! SonarScanner now auto-detects languages based on file extensions. Removesonar.language=vbfrom yoursonar-project.propertiesfile entirely—this old setting might be overriding the auto-detection and causing confusion. For older SonarQube versions, just confirm the value is correctly spelled asvb(notvb.netor another variant).Validate SonarScanner version compatibility
Ensure your SonarCLI (SonarScanner) version is compatible with both your SonarQube server and the VB.NET plugin. Outdated scanners might not recognize newly installed plugins. Check the SonarScanner version matrix to match it to your server version, then update the scanner if needed.Confirm VB.NET files exist and aren’t excluded
SonarScanner relies on detecting.vbfiles to recognize the language. If your project has no VB files, or they’re excluded viasonar.exclusionsin your properties file, the scanner will throw this error even with the plugin installed. Double-check your exclusion rules and make sure the project directory contains valid.vbfiles.Do you need to restart the entire server?
Usually, restarting the SonarQube service is enough after plugin changes. That said, if all the above steps fail, a full server reboot can clear lingering process caches or system-level issues that might be blocking the plugin from loading. Treat this as a last-resort step, though.
内容的提问来源于stack exchange,提问作者Raq

