Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Large XML Files in VS 2017 15.1

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

like image 747
Patrick Avatar asked May 10 '17 10:05

Patrick


People also ask

Why is my XML file so big?

Often times, the large size of XML structures is due to the fact that they are an XML representation of a database dump. There might be redundant or even useless information that you could discard with an XSLT transformation.

Is there a limit on XML file size?

There is no limit of XML file size but it takes memory (RAM) as file size of XML file, so long XML file parsing size is performance hit.

Is too large to open with XML editor The maximum file size is?

xml' is too large to open with XML editor. The maximum file size is '10' MB.

How do I open a heavy XML file?

If you want to open an XML file and edit it, you can use a text editor. You can use default text editors, which come with your computer, like Notepad on Windows or TextEdit on Mac.


1 Answers

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
like image 141
Daniel Fisher lennybacon Avatar answered Oct 04 '22 07:10

Daniel Fisher lennybacon