Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Android] PlatformNotSupportedException in Directory.Exists #12094

@luhenry

Description

@luhenry

Steps to Reproduce

  1. make -C sdks/builds archive-android -j32
  2. make -C sdks/android check-mini

Current Behavior

We get the following exception on CI:

[ERROR] FATAL UNHANDLED EXCEPTION: System.PlatformNotSupportedException: Operation is not supported on this platform.
  at System.IO.Directory.Exists (System.String path) [0x00019] in <049d40a7b95348c1852edcf908496be1>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x000d5] in <049d40a7b95348c1852edcf908496be1>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <049d40a7b95348c1852edcf908496be1>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00055] in <049d40a7b95348c1852edcf908496be1>:0 
  at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x00007] in <049d40a7b95348c1852edcf908496be1>:0 
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <049d40a7b95348c1852edcf908496be1>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string)
  at System.IO.File.ReadAllText (System.String path) [0x00000] in <049d40a7b95348c1852edcf908496be1>:0 
  at Driver.RunTests () [0x00054] in <1c1e9d1f18454c37b2282a21c32d68f8>:0 

https://jenkins.mono-project.com/job/test-mono-mainline-product-sdks-android/416/label=osx-devices/parsed_console/log.html

Expected Behavior

Do not get PlatformNotSupportedException.

On which platforms did you notice this

[ ] macOS
[ ] Linux
[ ] Windows
[x] Android

Version Used:

mono:master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions