Visual Studio IntelliSense
This topic covers how to integrate MAML schema files into Visual Studio's global schema cache to provide IntelliSense when editing MAML topics within Visual Studio.
The guided installer used to install Sandcastle and the related tools provides an option to install the MAML schemas in the Visual Studio global schema cache for you.
Because changes are made to the Program Files folder, you will need administrative privileges to perform these updates. In the instructions below, %ProgramFiles(x86)% is used to refer to the Program Files folder. This will typically be C:\Program Files on 32-bit systems and C:\Program Files (x86) on 64-bit systems. You may need to alter the paths below if you installed Visual Studio in a different location.
Update the Visual Studio root catalog file. This will be %ProgramFiles(x86)%\Microsoft Visual Studio [XX]\Xml\Schemas\catalog.xml for Visual Studio 2015 and earlier or %ProgramFiles(x86)%\Microsoft Visual Studio\[XX]\[Edition]\Xml\Schemas\catalog.xml for Visual Studio 2017 and later. "[XX]" will be the version such as 14.0 or 2017 and "[Edition]" will be the edition such as Community, Professional, or Enterprise. Add the following line to the end of the list in the SchemaCatalog element:
<Catalog href="%SHFBROOT%Schemas/Authoring/catalog.xml" />
By using the path to the copy of the files in the help file builder installation, it will always use the most recent version of the schema files.
Restart any open instances of Visual Studio. IntelliSense should now work for all MAML topics automatically.
Updates to Visual Studio may reset the global schema cache undoing the changes made above. If that happens and you no longer see IntelliSense for MAML files, simply apply the changes again.