VS 2017中的大型XML文件15.1

问题描述 投票:10回答:2

我被告知......

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

密钥15.0_65fa8ce7_Config不仅不存在,所以我手动创建它(加上子键)但MaxFileSizeSupportedByLanguageService是什么类型的?

为什么它不存在呢?

Registry

xml registry visual-studio-2017
2个回答
14
投票

这是一个小型的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

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

$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

6
投票

在Visual Studio 2015中,您可以在MaxFileSizeSupportedByLanguageService中找到类型为string(14.0_Config\XmlEditor)的注册表项REG_SZ

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

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

© www.soinside.com 2019 - 2024. All rights reserved.