大网数据广告活动
Web服务器与PHP

System Configuration Error Using Online Installer

· 52CE 我爱测

Helps resolve a system configuration error that occurs when you install Visual Studio using the online installer on a Windows 10, version 21H2 machine.

Symptoms

When you install Visual Studio using the online installer on a Windows 10, version 21H2 machine, it fails with the following error message in the setup logs:

HttpWebRequest& webRequest, String& remoteAddress, CancellationToken cancellationToken)
Download failed using WebClient engine. System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize --->
System.Configuration.ConfigurationErrorsException: Unrecognized element. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 141)

Cause

The error message indicates that there's a corrupt or incorrect setting in the machine.config file located at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\.

Resolution

To solve the issue, follow these steps:

  1. Open File Explorer and navigate to the path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\.
  2. In the Config directory, locate the machine.config file.
  3. Rename the machine.config file to create a backup. You can rename it to machine_bkp.config or any other name of your choice.
  4. Still in the same directory, locate the machine.config.default file.
  5. Make a copy of the machine.config.default file.
  6. Rename the new copy of the file to machine.config. This file replaces the existing machine.config file with the default version.
  7. Restart your machine to ensure the changes take effect.

Renaming the machine.config file and replacing it with the default version resets the configuration to its original state, which can help resolve any corrupt or incorrect settings that might have caused the Visual Studio bootstrapper to fail during installation.

After restarting your machine, run the Visual Studio online installation again. The bootstrapper should now be able to launch successfully without encountering the ConfigurationErrorsException related to the machine.config file.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 12/27/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。