I have a winforms application.
I want to create 2 configuration files: one with the connection string, the other with the cache file paths.
How do I create my own configuration file with the extension.yml and where should I place it?
I created a configuration file inside the project, and registered it in Configuration Builder using https://github.com/andrewlock/NetEscapades.Configuration . But it seems to me that it is not correct to store the configuration file inside the project, and I do not want to use App.config since it should be compiled in App.config.exe
If your file contains YAML documents, you should use the extension .yaml
which is what has been the official recommendation since at least September 2006 (twothousand and six).
For the lack of something like XDG_CONFIG_HOME on windows, in my code I expand the environment variable APPDATA
( i.e. %APPDATA% in windows explorer ) and create a namespace under that where I put configuration files, creating them with default values, if they don't exist already.
(Sorry, I have no tools to create C# example code)