¿Dónde Está La Máquina.Config?


Quiero aplicar un cambio para poder usar la configuración de GC del servidor para mi aplicación C# 3.5 - puedo hacerlo editando el archivo machine.config.

El único problema es que no sé dónde está.

¿Cómo puedo encontrar la ruta de este archivo de forma repetible en varias máquinas diferentes

Author: Jack Kada, 2010-02-24

8 answers

32-bit

%windir%\Microsoft.NET\Framework\[version]\config\machine.config

64-bit

%windir%\Microsoft.NET\Framework64\[version]\config\machine.config 

[version] debe ser igual a v1.0.3705, v1.1.4322, v2.0.50727 o v4.0.30319.

v3.0 y v3.5 solo contienen asambleas adicionales a v2.0.50727 por lo que no debería haber config\machine.config. v4.5.x y v4.6.x se almacenan dentro de v4.0.30319.

 514
Author: Peter,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-29 07:49:34

Puede ejecutar esto en powershell:

[System.Runtime.InteropServices.RuntimeEnvironment]::SystemConfigurationFile

Que genera esto para. net 4:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config

Sin embargo, tenga en cuenta que esto puede cambiar dependiendo de si.net se ejecuta como 32 o 64 bits, lo que dará lugar a \Framework\ o \Framework64\ respectivamente.

 74
Author: Daniel Little,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-06-24 15:27:56

Para estar absolutamente seguro, coloque una Etiqueta en un ASP.NET página y ejecutar este código:

labelDebug.Text = System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile;

¡Creo que esto no dejará ninguna duda!

 44
Author: Dining Philanderer,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-09-28 15:39:21

Aunque depende parcialmente... el mío es:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG

Y

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG

 15
Author: Timothy Khouri,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-02-24 11:20:08

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG

 2
Author: John Saunders,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-02-24 11:20:01

En su asp.net aplicación utilice este

using System.Configuration;
Response.Write(ConfigurationManager.OpenMachineConfiguration().FilePath);
 2
Author: Hosein Djadidi,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-10-12 03:33:04

Puede ejecutar esto en powershell: copiar y pegar en power shell [Sistema.Ejecución.InteropServices.RuntimeEnvironment]:: SystemConfigurationFile

La salida de la mina es: C:\Windows\Microsoft.NET\Framework\v2.0.50527\config\machine.config

 0
Author: lazydeveloper,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-16 19:06:46
  1. Abra el comando Windows Run. Acceso directo = > tecla de Windows + r
  2. Tipo "microsoft.net" - MS. NET carpeta se abre
  3. Abra la carpeta "Framework/Framwoek64" (basada en su procesador).
  4. Seleccione la carpeta de versión FW específica, por ejemplo, "v4. 0. 30319"
  5. Abrir carpeta de configuración
  6. Máquina.la configuración estará disponible allí. Aclamaciones.
 0
Author: Saikat Chakraborty,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-06-01 02:37:41