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

3 Answers 3

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
3
  • I did this as shown, didn't work, but then tried with HKCU instead of HKLM on the last line, since the message from VS does mention HKCU. It worked with HKCU.
    – Thierry_S
    Commented Aug 10, 2018 at 15:26
  • 1
    For me, HKLM was actually necessary, HKCU didn't work
    – Dave M
    Commented Sep 4, 2018 at 12:12
  • the first snippet works like charm for VS Studio 2019. Thank you!
    – Dika
    Commented Nov 14, 2020 at 4:02
13

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.

1
  • 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! Commented Jul 13, 2023 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

1
  • 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
    Commented May 10, 2017 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.