19

I am being told to ...

'sms-20170225122824.xml' is too large to open with XML editor. The maximum file size is '10' MB. Please update the registry key 'HKCU\Software\Microsoft\VisualStudio\15.0_65fa8ce7_Config\XmlEditor\MaxFileSizeSupportedByLanguageService' to change the maximum size.

Not only does the key 15.0_65fa8ce7_Config not exist, so I created it manually (plus the sub-keys) but what type is MaxFileSizeSupportedByLanguageService?

And why doesn't it exist already?

Registry

Patrick
  • 5,526
  • 14
  • 64
  • 101

3 Answers3

26

Here is a small powershell to do the job for all users

$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

If there are already settings in the users hive you can either delete them or set the value at user level - which also does not require admin privileges:

$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
Daniel Fisher lennybacon
  • 3,865
  • 1
  • 30
  • 38
10

Open a developer command prompt in Visual Studio (Tools -> Command Line -> Developer Command Prompt). In the command prompt type:

VsRegEdit set local HKLM XmlEditor MaxFileSizeSupportedByLanguageService string 500

(Replace 500 with whatever value you'd like, it's in MB). Restart Visual Studio.

Shea
  • 11,085
  • 2
  • 19
  • 21
  • This worked for me in VS 2019. I first manually set the value in HKCU (rather than HKLM) exactly as instructed in the warning message I got using regedit and that *didn't* work. Odd. Thanks! – Matt Gibson Jul 13 '23 at 12:41
7

In Visual Studio 2015, you could find the registry key MaxFileSizeSupportedByLanguageService in 14.0_Config\XmlEditor of type string (REG_SZ).

Not sure if this will work with VS 2017 though. According to Microsoft doc: "To deliver on a low-impact install of Visual Studio that also supports side-by-side installs, we no longer save most configuration data to the system registry..." (source)

Edit: have a look at this answer on how to update the registry settings for Visual Studio 2017: https://stackoverflow.com/a/42871072/107675

neural5torm
  • 773
  • 1
  • 9
  • 21
  • I edited my post to show what my registry currently looks like with Visual Studio 2017. Not only does 15.0_65fa8ce7_Config not exist, neither does the correct sub keys under the other one. – Patrick May 10 '17 at 10:52