I just installed ASP.NET 5 and created a Console Application in Visual Studio. I\'ve added a file, config.json, to the root folder of the project.
It looks like this: >
Have a type like the following:
public class FolderSettings
{
public Dictionary TargetFolderLocations { get; set; }
}
You can then use the ConfigurationBinder
to automatically bind configuration sections to types like above. Example:
var folderSettings = ConfigurationBinder.Bind(config.GetConfigurationSection("Data"));
var path = folderSettings.TargetFolderLocations["TestFolder1"];