What is the .NET XML configuration file for?

I found that some of the .NET executables have a .config file. For example, I have LINQPad.exe and LINQPad.exe.config.

What is LINQPad.exe.config for?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
  <runtime>
    <legacyUnhandledExceptionPolicy enabled="1" />
  </runtime>
</configuration>
+3
source share
4 answers

It is used to save application settings.

See: http://msdn.microsoft.com/en-us/library/8eyb2ct1.aspx

+4
source

This is the configuration file specific to it .exe

Configurations allow you to change some parameters without having to recompile the application. Quite often, a configuration file contains a combination of default values ​​and user settings.

, machine.config, ASP.NET, web.config

+3

, . , . XML , , . , .NET framework API-, , (System.Configuration).

+3

, , .ini , .

Here's a good relatively non-technical explanation: http://www.developer.com/net/net/article.php/3396111/Using-Application-Configuration-Files-in-NET.htm

The most common use for this is to save application settings, such as connection strings, so that you can change them without recompiling the program.

+2
source

Source: https://habr.com/ru/post/1769360/


All Articles