问题
I have a release configured in Visual Studio Team Services using Release Management to run a SonarQube for MSBuild task. The task starts and then fails with the following error:
Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\SonarQubePreBuild\1.0.29\SonarQubePreBuild.ps1
[error]Exception calling "GetFullPath" with "1" argument(s): "The path is not of a legal form."
Is this an error that I'm causing or is this an issue with the task?
回答1:
"SonarQube for MSBuild" is currently designed to use in "Build" process. So you will see some errors when use it in Release Management. You can submit a feature request on this page: http://visualstudio.uservoice.com/forums/330519-team-services
If you do want to use it in Release Management for now and your are using your own build agent rather than the hosted build agent. You can go to the "Tasks" folder in your build agent directory and update the "Path" variables in the PowerShell script for SonarQube task.
For example, changing the path variable "$env:BUILD_SOURCESDIRECTORY" to "$env:SYSTEM_DEFAULTWORKINGDIRECTORY" in "SonarQubePreBuildImpl.ps1", you will get the SonarQubePreBuild task finished successfully.
来源:https://stackoverflow.com/questions/34337042/exception-calling-getfullpath-with-1-arguments-the-path-is-not-of-a-legal