Forum Xamarin Test Cloud (Read Only)

Correct path to read from file when testing on Test Cloud

I am struggling to provide a proper path in my Test code
I've got error on Test cloud:
"System.IO.DirectoryNotFoundException : Could not find a part of the path "/Volumes/Data/xamarin/workspaces/9f82bc94-6e0b-4c2c-a5bd-60e726b25c16/workspace/MyMd.Mobile.UITests/bin/TestCloud/TestData/Credentials.txt".

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x3169510 + 0x001a3> in :0

when I want to read from a file located in my /TestData/Credentials.txt
I've tried all possible path combinations... and the file MUST exist since locally it works...
what should be the proper path after "/Volumes/Data/xamarin/workspaces/9f82bc94-6e0b-4c2c-a5bd-60e726b25c16/workspace/..."

Please help...

Best Answers


  • mateuszcwiklamateuszcwikla USMember ✭✭

    Thx, will test and let you know... but also can you confirm how you build your Path to files in and how it looks in Test cloud after "/Volumes/Data/xamarin/workspaces/9f82bc94-6e0b-4c2c-a5bd-60e726b25c16/workspace/..."

  • mateuszcwiklamateuszcwikla USMember ✭✭

    Hi, thanks for the help, I've marked the file as embedded and changed the method of reading from the file.
    This helped.

Sign In or Register to comment.