Search code examples
c#wpfdirectory-structure

Where should I store my App specific config files in WPF


Background : I have some Application Data. i.e. the Database, come important config files. This data is vital for the application to start else it is exited.

Problem : Where should I store this data. i.e in which folder and where. Right Now (This is wrong) it is stored in a folder in Debug/App_Data. But is causing issues in git and when we publish the App the data is not found. So where can we store this folder ?

Present Structure is "WpfApplication2\WpfApplication2\bin\Debug"

These Files need to be present when the app is started. So they need to be a part of the app itself.


Solution

  • Include those files to your project and set attribute Copy to Output directory to Copy always