VS 2017中的大型XML文件15.1

Pat*_*ick 11 xml registry visual-studio-2017

我被告知......

"sms-20170225122824.xml"太大,无法使用XML编辑器打开.最大文件大小为"10"MB.请更新注册表项"HKCU\Software\Microsoft\VisualStudio\15.0_65fa8ce7_Config\XmlEditor\MaxFileSizeSupportedByLanguageService"以更改最大大小.

不仅键15.0_65fa8ce7_Config不存在,所以我创建它手动(加分项),但什么类型MaxFileSizeSupportedByLanguageService

为什么它不存在呢?

注册处

Dan*_*con 16

这是一个小型的PowerShell,可以为所有用户完成这项工作

$vsWherePath = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe"
$installPath = &$vsWherePath -all -latest -property installationPath
$vsregedit = Join-Path $installPath 'Common7\IDE\vsregedit.exe'
& $VsRegEdit set "$installPath" "HKLM" "XmlEditor" "MaxFileSizeSupportedByLanguageService" string 100
Run Code Online (Sandbox Code Playgroud)

如果用户配置单元中已有设置,您可以删除它们或在用户级别设置值 - 这也不需要管理员权限:

$vsWherePath = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe"
$installPath = &$vsWherePath -all -latest -property installationPath
$vsregedit = Join-Path $installPath 'Common7\IDE\vsregedit.exe'
& $VsRegEdit set "$installPath" "HKCU" "XmlEditor" "MaxFileSizeSupportedByLanguageService" string 100
Run Code Online (Sandbox Code Playgroud)


Arn*_*hea 12

在 Visual Studio 中打开开发人员命令提示符 ( Tools -> Command Line -> Developer Command Prompt)。在命令提示符下键入:

VsRegEdit set local HKLM XmlEditor MaxFileSizeSupportedByLanguageService string 500
Run Code Online (Sandbox Code Playgroud)

(将 500 替换为您想要的任何值,单位为 MB)。重新启动 Visual Studio。


neu*_*orm 6

在Visual Studio 2015年,你能找到注册表项MaxFileSizeSupportedByLanguageService14.0_Config\XmlEditor字符串类型(REG_SZ).

不确定这是否适用于VS 2017.根据Microsoft doc说:"为了提供支持并行安装的低影响安装的Visual Studio,我们不再将大多数配置数据保存到系统注册表......" (来源)

编辑:看看有关如何更新Visual Studio 2017的注册表设置的答案:https: //stackoverflow.com/a/42871072/107675