InspectCode Command Line Error - Cannot find path

Hi,

 

I'm getting the below error when running inspect code. Could you please let me know the issue.

 

##[error]System.Management.Automation.ItemNotFoundException: Cannot find path 'E:\vsts-agent-HJ\_work\9\s\CodeQualityResults.xml' because it does not exist.
 
The directory is available, and the file should create. But its not.
 
Thanks,
Murali.
0
4 comments

Hello!

 

Thank you for the feedback.

Is the problem reproduced for a newly created solution or for the specific one?

Have you tried running the tool inside the specified folder?

Thank you.

0
Avatar
Permanently deleted user

Hi Angelina,

 

Thanks for your response.

I'm getting this error in CI build ( VSTS ). When am running through command line ( in my local system ), its working fine. But this error is while deploying the solution through VSTS. Any suggestions !!

 

 

Thank you,

0

Hello!

 

Not sure how we can help here, seems to be some access issue.

Possibly trying to run as a administrator or changing access rights on corresponding folder could help.

Thank you.

0
Avatar
Permanently deleted user

This is being tracked in https://github.com/alanwales/vsts-resharper-code-quality-task/issues/14, the rest is my experience which is also posted there.

 

So, apparently this is caused by VSTS (powershell?) checking the given path to rigiously: it expects that path gives as arguments in the `Start-Process` call are all existent. This means it isn't necessarily related to this plugin, but it might be possible to solve it in the script.

Anyways, for now we've added a simple bash script, which creates the output file before running the analysis task.

So, the Bash script, run in `$(Common.TestResultsDirectory)`
```
touch resharper_analysis.xml
```
with `$(Common.TestResultsDirectory)\resharper_analysis.xml` as "Results output file path" in this plugin works.

0

Please sign in to leave a comment.