Hi jm-5055,
Welcome to our Microsoft Q&A platform!
To access the file under Xamarin.Forms project, you need to set the file's Build Action to EmbeddedResource first.
And use the following code to get the file stream.
var assembly = IntrospectionExtensions.GetTypeInfo(typeof(MainPage)).Assembly;
Stream stream = assembly.GetManifestResourceStream("myassembly.test.txt");
For more info, you can refer to the documentation: File Handling in Xamarin.Forms.
Regards,
Kyle
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.