System.IO.File does not contain a definition for ReadAllBytes

Viewed 221

I read image bytes with File.ReadAllBytes() when I develop an Android application with xamarin.forms. The code works well in debug mode. However, it throws an error

System.IO.File does not contain a definition for ReadAllBytes

in release mode. I wonder why this happened? Can I fix it by changing some settings for visual studio? Or it is ok that I use other way to read image byte.

1 Answers

enter image description here

Thanks for everyone. I have figured out the problem. So stupid I am that I configured wrong setting for release mode by accident.

Related