Hi I am trying to run a windows command from Jenkins but getting error as
Could not execute because the specified command or file was not found. Possible reasons for this include:
- You misspelled a built-in dotnet command.
- You intended to execute a .NET Core program, but dotnet-sonarscanner does not exist.
- You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
I am running below command
dotnet sonarscanner begin /d:sonar.host.url=http://abcd.com:9000 /d:sonar.login=xyz /d:sonar.password=xyz /k:"sampleproject" /d:sonar.cs.opencover.reportsPaths="D:\JenkinsWorkspace\workspace\sampleproject\sampleAPI\sampleAPI_Test\coverage.opencover.xml"
above command is running successfully in command prompt, only issue with Jenkins