Forum General
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Read/Write a file in a shared project

tvaltval Member ✭✭
edited November 2019 in General

I have a project that is shared between .Net Core, IOS, and Android. In the shared project, using NetStandard, I have several text files that are embedded resources. I can use the following code to read the resources

  Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(file);
        string contents = "";
        using (var reader = new System.IO.StreamReader(stream))
                contents = reader.ReadToEnd();

But now, I want to be able to update those text files (from data from a server) without having to update the App on the play stores. Unfortunately, it appears that updating a resource file is not possible. Is there another way of being able to distribute a plain text file in a shared project with the application, but then to be also able to overwrite it or change its contents?

Sign In or Register to comment.