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
System.IO.PathTooLongException: The specified path, file name, or both are too long.
System.IO.PathTooLongException: The specified path, file name, or both are too long.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: System.IO.PathTooLongException: The specified path, file name, or both are too long.
Hello bhavani,
Unfortunately, windows enforces a character limit on file names and directories. If you are using server 2016 or windows 10 you can enable long paths by following the respective guides below:
Server 2016 - https://eocloud.cloudferro.com/knowledg ... cle&id=135
Windows 10 - https://betanews.com/2016/05/29/long-paths-windows-10/
Alternatively, you can edit the registry and make the %localAppData% folder name more shallow, this is the local execution directory when using Agent. It is highly recommended this be changed back as it may affect other application that utilizes the directory.
Registry Key - Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Guide - https://www.windows-commandline.com/cha ... -location/
Regards,
Sean
Unfortunately, windows enforces a character limit on file names and directories. If you are using server 2016 or windows 10 you can enable long paths by following the respective guides below:
Server 2016 - https://eocloud.cloudferro.com/knowledg ... cle&id=135
Windows 10 - https://betanews.com/2016/05/29/long-paths-windows-10/
Alternatively, you can edit the registry and make the %localAppData% folder name more shallow, this is the local execution directory when using Agent. It is highly recommended this be changed back as it may affect other application that utilizes the directory.
Registry Key - Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Guide - https://www.windows-commandline.com/cha ... -location/
Regards,
Sean