Exception running InspectCode and then directly after TeamCity.ImportData
See original GitHub issueHere is the exception
[17:00:11][Step 1/1] Importing data from ‘artifacts/_ReSharperReports/inspectcode-report.xml’ (45.71 KB) with ‘ReSharperInspectCode’ processor [17:00:11][Step 1/1] Caught exception while running service process importData [17:00:11] [Step 1/1] java.io.FileNotFoundException: C:\Temp\buildAgent1\work\ab9b99833ae569b1\artifacts_ReSharperReports\inspectcode-report.xml (The process cannot access the file because it is being used by another process) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at jetbrains.buildServer.dotnetTools.agent.inspectCode.InspectCodeFileProcessor.processReport(InspectCodeFileProcessor.java:54) at jetbrains.buildServer.dotnetTools.agent.inspectCode.InspectCodeDataProcessor.processData(InspectCodeDataProcessor.java:38) at jetbrains.buildServer.agent.impl.inspections.DataImportServiceMessage$1.run(DataImportServiceMessage.java:93) at jetbrains.buildServer.agent.impl.serviceProcess.impl.ThreadedServiceProcessFactory$1.run(ThreadedServiceProcessFactory.java:31) at java.lang.Thread.run(Thread.java:745)
This is due to this line which does resultsFile.Open(FileMode.Open)
Looks like there is the same problem here https://github.com/cake-build/cake/blob/develop/src/Cake.Common/Tools/DupFinder/DupFinderRunner.cs#L193 cc @gep13
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
👍 Works perfectly! well done @gep13
@gep13 don’t worry I will do so 😃