I have been using https://fabienroyer....ith-a-netduino/ as a guideline for updating my application remotely at runtime on ND+2.
However, the problem is that the size of.pe file is about 60KB, and that results in low memory exception when the code reads assembly bytes and copies them into byte array (assmfile.Read, taking 60KB of RAM) and then loads the assembly (Assmbley.Laod, taking another 60KB of RAM). I am aware that I can break down the application into smaller separate assemblies and load them separately. But, I would like to leave it as the last option, since most parts of the application work dependently to each other, and separating them would be a pain.
Is there any way that I can somehow combine two said steps together or bypass loading the assembly into byte array to save some spaces?
Also, I am wondering if the above technique is the only way to have in-field remote update for applications on Netduino boards.
Thanks.