Background: I had a large xml string in setup and it was not deserialized. XmlSerializer complained that it is not valid xml. When viewing a line in Project> Settings, it looked truncated.
I searched googled if there is a size limit for application parameters but nothing was found.
Then I tried to play it using dummydata generated by the following code:
[Test] public void DumpDummyData() { int n = 500; var s = new string('a', 100); using (FileStream stream = File.OpenWrite(@"C:\Temp\"+n+".txt")) { using (var writer = new StreamWriter(stream)) { for (int i = 0; i < n; i++) { writer.WriteLine( i +" " +s); } } } }
The line is truncated on line 310 when inserting the contents of the file into the setting. Tried this in two different projects.
My question is, what is the limit for application settings size?
c # application-settings
Johan larsson
source share