Read/Write a file in a shared project

tvaltval Member ✭✭
edited November 27 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?

Tagged:
Sign In or Register to comment.