F
F
FairyFox57002020-02-12 14:27:14
C++ / C#
FairyFox5700, 2020-02-12 14:27:14

Where is the best place to store serialization files?

I am using serialization data to populate a DataSet storage.
For example, I have serializable recipes, and then from this file I fill in the DataSet.Recipes list. This list is used throughout the program.
When deploying the project, I need the user to be able to use this list too. Now it is stored on my machine, roughly speaking, on drive D.
Where should they be stored so that users of my program can access them, and how to save the path to these resources (perhaps I need to use appconfig?)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-02-12
@FairyFox5700

Microsoft recommends using this method
https://docs.microsoft.com/en-us/dotnet/api/system...
You need to call it with a userdir, userdocuments, or appdata variable
Store the settings in app.settings or in the registry , it's more convenient for you

S
SlNik, 2020-02-13
@SlNik

It is advisable to save to a folder where administrator rights are usually not required, let's say in my documents:
Environment.SpecialFolder.Personal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question