System.IO.Notfound exception for accessing resx files in Xamarin Forms

Asked

Viewed 8 times

0

Good Afternoon. I am facing a problem to access values defined in resx files of the shared code in Xamarin Forms. No failure to compile, but when running I get Yma exception of type File.IO.Notfound, as if the Resource file did not exist inside the mobile device (either in the emulator or on a physical device. To access the value within the Resource file, I use the following static method: Resources.Colors.Colorprimary. Actions that have already been done: Compile action change to copy forever, Class from Resource changed to public. ps.: Files are generated in the debug bin directory

1 answer

0

Solved. Since I was using a different Cultureinfo, I had to create all the files from Resources for the specified culture. As I had separated a Source file for each purpose (Colors, Values and String) I had to create an equal file for each culture.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.