The stakeholder wants the application data to be stored as XML in a plain text file that could be read by a tool like notepad - not totally unreasonable. But that causes a problem when testing my CRUD methods. A test must write something to the XML file then read it back in to check that it was written correctly. However, that invariably raises an IOException complainig, that "some other process" is accessing the file. Of course the "other process" is in fact my test process. The section in the NCrunch Docs about concurrency talks about <ExclusivelyUses...> and <Serializable...>, but none of that helps, if the process is interfering with itself.
This must be a pretty common problem, but I haven't been able to come up with a working solution. Anybody got an idea here?