Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified

SonarScanner for MSBuild 4.6.2
Using the .NET Framework version of the Scanner for MSBuild

Hi,

I performed the following steps, but I am getting an error on the end step.

SonarScanner.MSBuild.exe begin /k:"ACTOR" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="admin" /d:sonar.password="admin"

SonarScanner for MSBuild 4.6.2

Using the .NET Framework version of the Scanner for MSBuild

Pre-processing started.

Preparing working directories...

09:39:37.978 Updating build integration targets...

09:39:38.046 Fetching analysis configuration settings...

09:39:39.713 Provisioning analyzer assemblies for cs...

09:39:39.713 Installing required Roslyn analyzers...

09:39:40.618 Provisioning analyzer assemblies for vbnet...

09:39:40.623 Installing required Roslyn analyzers...

09:39:40.662 Pre-processing succeeded.


MSBuild.exe ACTOR /t:Rebuild
Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Then finally I run:

SonarScanner.MSBuild.exe end /d:sonar.login="admin" /d:sonar.password="admin"
SonarScanner for MSBuild 4.6.2
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
Calling the SonarQube Scanner...

Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at SonarScanner.MSBuild.Common.ProcessRunner.Execute(ProcessRunnerArguments runnerArgs)
   at SonarScanner.MSBuild.Shim.SonarScannerWrapper.ExecuteJavaRunner(AnalysisConfig config, IEnumerable`1 userCmdLineArguments, ILogger logger, String exeFileName, String propertiesFileName, IProcessRunner runner)
   at SonarScanner.MSBuild.Shim.SonarScannerWrapper.InternalExecute(AnalysisConfig config, IEnumerable`1 userCmdLineArguments, ILogger logger, String fullPropertiesFilePath)
   at SonarScanner.MSBuild.Shim.SonarScannerWrapper.<>c__DisplayClass7_0.<Execute>b__0()
   at SonarScanner.MSBuild.Shim.SonarScannerWrapper.Execute(AnalysisConfig config, IEnumerable`1 userCmdLineArguments)
   at SonarScanner.MSBuild.PostProcessor.MSBuildPostProcessor.InvokeSonarScanner(IAnalysisPropertyProvider cmdLineArgs, AnalysisConfig config)
   at SonarScanner.MSBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, ITeamBuildSettings settings)
   at SonarScanner.MSBuild.BootstrapperClass.PostProcess()
   at SonarScanner.MSBuild.BootstrapperClass.Execute()
   at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
   at SonarScanner.MSBuild.Program.Main(String[] args)

I would appreciate any help or ideas. Thanks

Hi @Mike_Barna. Welcome to the community.

Do you have Java installed on the machine, and if so which version?