FYI, I hit this today. Submitted the bug to Unity, but unless they grab the extended folders I doubt they can replicate it easily.
I have a project that I had to move from Unity 5.2 back to Unity 5.1. Unsure if thats part of the cause.
Everything has been working great. However, today as part of my testing, I had to flood a response back to our web component. This involved creating a MASSIVE string until everything crashed.
When it crashed, I had the error appear:
The file “MemoryStream” is corrupted!
[Invalid Positions!]
Or something therein. Launching the project would generate this error a whole ton of times. And the scene would say the timestamps are invalid, and wipe the references for every single file in the scene. No matter how many times I reset the scene or dumped the changes in sourcetree it would replicate it self.
Further, there is no MemoryStream file. So what I did was delete the Libraries folder, obj folder, cleared all temp files, and for safety re-installed Unity 5.1.4.
Launching the scene everything is back to working order. I highly suspect, that just wiping the Library folder would resolve this for most people, but remember to make sure not to save the scene file (File>Save inside the editor) if you see this error, or the scene will save with missing references.
I got the same error in Windows project settings, build in on the Unity 2018.4.25f
when i import some assets and it loading the assemblies
expediently i closed vs 2019 community then it show me the error
Unloading broken assembly Library/ScriptAssemblies/Assembly-CSharp.dll, this assembly can cause crashes in the runtime