While trying to open a large XML file with Microsoft Visual Studio you might get the following error:
“‘File.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_95894220_Config\XmlEditor\MaxFileSizeSupportedByLanguageService’ to change the maximum size”
To solve this, open a Powershell prompt as administrator and execute the following lines:
$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 read "$installPath" "HKLM" "XmlEditor" "MaxFileSizeSupportedByLanguageService" string
& $VsRegEdit set "$installPath" "HKLM" "XmlEditor" "MaxFileSizeSupportedByLanguageService" string 100
& $VsRegEdit read "$installPath" "HKLM" "XmlEditor" "MaxFileSizeSupportedByLanguageService" string
Be the first to comment