System.IO.PathTooLongException: The specified path, file name, or both are too long.
Posted: Mon Jul 15, 2019 7:04 am
Hi,
I tried executing the exe file through ranorex agent from Powershell. In Ranorex Agent logs there is an exception which states that file name too long.
Error: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
at Ionic.Zip.ZipFile._InternalExtractAll(String path, Boolean overrideExtractExistingProperty)
at Ranorex.Dex.Common.Util.ArchiveIO.ExtractAll(AbsoluteFilePath zipFile, AbsoluteDirPath destinationDir)
at Ranorex.Dex.Components.TestExecution.Steps.FetchTestSuiteStep.ExecuteStep(StepExecutionInformation config, ProgressLogger progress)
at Ranorex.Dex.Components.TestExecution.Steps.ExecutionStep.Execute(StepExecutionInformation config, ITaskProgress`1 p).
PFA logfile.
These temp paths are nowhere provided in the ranorex solution. What needs to be changed. Any suggestions on this would be really helpful
Regards,
Bhavani V
I tried executing the exe file through ranorex agent from Powershell. In Ranorex Agent logs there is an exception which states that file name too long.
Error: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
at Ionic.Zip.ZipFile._InternalExtractAll(String path, Boolean overrideExtractExistingProperty)
at Ranorex.Dex.Common.Util.ArchiveIO.ExtractAll(AbsoluteFilePath zipFile, AbsoluteDirPath destinationDir)
at Ranorex.Dex.Components.TestExecution.Steps.FetchTestSuiteStep.ExecuteStep(StepExecutionInformation config, ProgressLogger progress)
at Ranorex.Dex.Components.TestExecution.Steps.ExecutionStep.Execute(StepExecutionInformation config, ITaskProgress`1 p).
PFA logfile.
These temp paths are nowhere provided in the ranorex solution. What needs to be changed. Any suggestions on this would be really helpful
Regards,
Bhavani V