How to create .net project in SonarQube

I am using SonarQube version -8.1 , Sonarscanner version – 4.2 ,JDK 11, MSBuild version – 12

Here I am trying to analyze a .net project in SonarQube. I am creating a project for .net in sonarqube. refer the attached screenshot.

Using first path in comment prompt in project location I am getting below error message.

Error Message :
‘SonarScanner.MSBuild.exe’ is not recognized as an internal or external command,
operable program or batch file.

But using same method, PHP and Java projects were created and analyzed successfully.

Since I am new to SonarQube, can anyone please guide me how to create a .net project in SonarQube and mention the required applications to be installed for creating project.

when I tried again two comments working fine but still i am getting one error.

Error msg :
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)
    Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
    19:25:55.352 Post-processing failed. Exit code: 1

steps 1,3 and 4 are done properly.
Issue in MSBuild version and i tried to download new version but no luck.
please someone help me in this issue.

@obusorna_k the version of MSBuild you are using is too old.

If you are building on a machine with VS2015 installed then you can get a newer version of MSBuild by updating to VS2015 Update 3.

If you have a newer version of VS installed, make sure you are building from the Developer command prompt for VSxxx, as that will use the newer version of MSBuild installed with that versioin of VS.