Problem with .NET framework with VB and C# in one solution (not code coverage)

Intro

SonarScanner is not able to process very basic project of .NET framework with two languages used.
Here is example: Bitbucket

Note. There is similar ticket https://community.sonarsource.com/t/reporting-coverage-for-net-solutions-with-vb-net-and-c-projects/18859 but it is related to cover coverage and nunit tests. Our project does not have any of unit tests same as an example project below.

Versions used

SonarQube 8.3, SonarScanner for MSBuild 4.7.1

Error observed

Generating SonarQube project properties file to c:\Jenkins\workspace\WEBCI\SonarBLT_TIANET3\.sonarqube\out\sonar-project.properties
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
Writing processing summary to c:\Jenkins\workspace\WEBCI\SonarBLT_TIANET3\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
22:16:33.912  Post-processing failed. Exit code: 1
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
ERROR: Execution of SonarScanner for MSBuild failed (exit code 1)

Steps to reproduce

Scan for very basic project: https://bitbucket.org/kvesters/sonarqube-vb-and-cs-project/src/master/

Potential workaround

No

Result

This is stopping us from purchasing SonarQube

HI @kvesters. Welcome to the community.

It looks like your sample project is a legacy web project, which is not supported. All modern project types that use MSBuild project files are supported.

@duncanp thank you for fast reply.
Unfortunately your reply does not help a lot on resolving the issue. :slight_smile:

May be you can comment more technically what you mean by legacy project? May be we can tweak some how project so it corresponds to Sonar needs?

p.s. project is MSBuild supported!

Hi @kvesters,

As Duncan already pointed out, you’re using legacy WebSite project that is not supported. Easiest solution for you is to convert the project into normal web application - in other words, add .csproj file to have a project and build it with MSBuild.