How to: Deploy the XML schema describing the serialization of your DSL?

The problem

If you build a DSL and deploy it on a different machine by double-clicking on a VSIX, everything should be fine, except that you will get warnings "Cannot find a schema..." each time you open an instance of your DSL. This is because the XML schema file generated by the DSL tools cannot be deployed with a VSIX yet

The 3 following cannot be deployed with a VSIX, in fact:

  • Provide an icon to identify our type of DSL file in Windows Explorer and Solution Explorer.
    (This is not the same as the VSIX icon, which appears in Extension Manager.)
  • Associate our type of DSL file with Visual Studio, so that users can double-click a file in Windows, and have the file open in Visual Studio.
  • Install an XSD so that the XML syntax of the DSL files is recognised by Visual Studio.

The solution

Since these cannot be achieved with a VSIX, you will need to create an MSI (setup file) that can do these things, and can have the VSIX embedded within it.

This is not too difficult to do, and is explained in details in the Chapter 5 of the DslToolsLab ( in the paragraph "Deploying the VSIX in an MSI"