Unable to scan the C# files though I am using latest scanner 5.x. Able to scan other languges

Sonar Qube Version: *9.9.1
Scanner: sonar-scanner-4.8.0.2856
MSBuild 14.0

My Code:

def scannerHome = tool ‘SonarQube_scanner_MSBuild’;
withSonarQubeEnv(‘NCR Enterprise SonarQube’) {
bat ""${scannerHome}"/bin/sonar-scanner -Dsonar.projectKey=myprojectkey -Dsonar.projectName=projectname -Dsonar.cfamily.build-wrapper-output=${env.CURRENT_WORKSPACE}\wrapper_output -Dsonar.projectVersion=1.0 -Dsonar.projectBaseDir=${env.CURRENT_WORKSPACE} -Dsonar.login=${ciCorpAccount} -Dsonar.sources=${env.CURRENT_WORKSPACE} -Dsonar.verbose=true -Dsonar.cs.vscoveragexml.reportsPaths=/*.coveragexml -Dsonar.exclusions=/Build_Temp//*,/SMSmAbort.cpp -Dsonar.host.url=url -Dsonar.coverage.exclusions=//* "
bat “if exist %cd%\CURRENT_DEV\Source\.scannerwork\report-task.txt xcopy /y %cd%\CURRENT_DEV\Source\.scannerwork\report-task.txt %cd%\${sonarQubeReportFilename}*”

Getting following error when I tried to scan the .net files from the Jenkins CI. 
WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html

Find the logs below using verbose command:

The target "CoreCompile" listed in a BeforeTargets attribute at "C:\Users\ja230090\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets (34,129)" does not exist in the project, and will be ignored.
     1>Project "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\Scotssf\scotssf.vcxproj" on node 1 (rebuild target(s)).
     1>_PrepareForClean:
         Deleting file "Release_Unicode140\SCOTSSF.tlog\SCOTSSF.lastbuildstate".
       The target "CoreCompile" listed in a BeforeTargets attribute at "C:\Users\ja230090\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets (34,129)" does not exist in the project, and will be ignored.
     1>Project "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\Scotssf\scotssf.vcxproj" (1) is building "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.vcxproj" (2) on node 1 (Clean target(s)).
     2>_PrepareForClean:
         Deleting file ".\Release_Unicode140\SCOTSSFMsg.tlog\SCOTSSFMsg.lastbuildstate".
     2>Done Building Project "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.vcxproj" (Clean target(s)).
     1>Project "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\Scotssf\scotssf.vcxproj" (1) is building "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.vcxproj" (2:2) on node 1 (default targets).
     2>InitializeBuildStatus:
         Creating ".\Release_Unicode140\SCOTSSFMsg.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
       CustomBuild:
         Performing Custom Build Tools on "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.mc"
         MC: Compiling F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.mc
       ResourceCompile:
         C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin\rc.exe /D NDEBUG /D _VC80_UPGRADE=0x0600 /D _USING_V110_SDK71_ /D _UNICODE /D UNICODE /l"0x0409" /nologo /fo".\Release_Unicode140\SCOTSSFMsg.res" SCOTSSFMsg.rc 
       Link:
         E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:".\Release_Unicode140\SCOTSSFMsgU.dll" /INCREMENTAL:NO /NOLOGO /WX odbc32.lib odbccp32.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:".\Release_Unicode140\SCOTSSFMsgU.pdb" /SUBSYSTEM:WINDOWS,"5.01" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Release_Unicode140\SCOTSSFMsgU.lib" /MACHINE:X86 /SAFESEH /DLL .\Release_Unicode140\SCOTSSFMsg.res
         SCOTSSFMsg.vcxproj -> F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\.\Release_Unicode140\SCOTSSFMsgU.dll
         SCOTSSFMsg.vcxproj -> .\Release_Unicode140\SCOTSSFMsgU.pdb (Full PDB)
       FinalizeBuildStatus:
         Deleting file ".\Release_Unicode140\SCOTSSFMsg.tlog\unsuccessfulbuild".
         Touching ".\Release_Unicode140\SCOTSSFMsg.tlog\SCOTSSFMsg.lastbuildstate".
     2>Done Building Project "F:\ci-build\agent\workspace\SSCO_SUSDAY10132\adk_sscan1\ADK\Samples\SCOTCoreApp\SCOTSSFMsg\SCOTSSFMsg.vcxproj" (default targets).
     1>InitializeBuildStatus:
         Creating "Release_Unicode140\SCOTSSF.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

Hey there.

Check the SonarScanner for .NET section of this documenation to understand how to actually call the Scanner for .NET. It looks like you’re still calling the sonar-scanner CLI.