Which is the best way to store application and user settings of an application running with multiple instances?
My problem is that using the vb’s “Application Settings” one instance would overwrite the other one.
I want to identify each instance with a number passed via command line argument. I could use this number to identify the appropriate settings of the running instance, but I see in a local INI o XML file a better way to handle that.
Is there any alternative, maybe native in .NET?
Thank you.
The best idea for this scenario is to use a database. Concurrent access is what databases are designed for. It will be simpler to develop and maintain than most custom cross-process data storage solutions.
Maybe SQL Server (since it is well-integrated into VS), or SQL Server Express.
You could also try a DB that is a bit more embedded, and simpler to install/distribute, like SqLite. Here are a couple quick tutorials on how to get started with SqLite: