0

Spring Cloud Config allows to store and provide configuration for applications, multiply deployed to distributed environment. Is there a .NET alternative? So in app.config I can say - get config, or variable, or section from this endpoint.

Andrey Ershov
  • 1,773
  • 1
  • 16
  • 26

1 Answers1

1

Yes there is. In .Net you have so-called Build Configurations. Default for a project is that you have a "debug" and "release" configuration, but you can have many more. Using .Net, you can specify which configuration settings you want for as many build configurations you have, and then load them using something like:

var mySettings = ConfigurationManager.GetSetting["mySetting"]; // pseudo, I forgot the exact syntax

For cloud-projects, you have a corresponding CloudConfigurationManager

This has changed somewhat for UWP projects and .Net Core in which someone else may help me complete the answer. The solution I gave you is valid for most .Net projects though.

In this thread, you get a good tip for something called SlowCheetah that helps you with this

Community
  • 1
  • 1
Pedro G. Dias
  • 3,162
  • 1
  • 18
  • 30