This documentation is archived and is not being maintained.

How to: Remove a Domain-Specific Language 

When you are developing and debugging a domain-specific language, the language is registered in the Experimental hive of the Visual Studio section of the registry. This is the standard Visual Studio SDK method of developing packages; it ensures that when you start Visual Studio in the normal way, experimental and possibly faulty packages do not interfere with normal work. The experimental hive is only used when you start Visual Studio with the Run command from a domain-specific language solution; or when you start it with the Start Visual Studio under experimental hive menu command in the Visual Studio SDK menu.

In the normal course of work, two actions have the effect of removing old language packages from the Experimental hive. Firstly, creating a domain-specific language with the New Project dialog automatically removes old languages with the same filename extension. Secondly, building a language solution replaces the previous version.

However, you may wish to clear out all your experimental packages. Indications for this procedure include:

  • Persistent "Package Load Failure" errors when the experimental instance of Visual Studio starts.

  • New Item dialog cluttered with obsolete templates.

Where the language appears

Your domain-specific language appears in three places:

  • The Visual Studio Experimental hive of the system registry, located at


  • The Item Templates folders under

    My Documents\Visual Studio 2005\Templates\ItemTemplates

  • The Global Assembly Cache contains copies of the built assemblies. In general, it is not necessary to remove packages from the GAC if they have been removed from the registry.

Cleaning Up Experimental Domain-Specific Languages

This procedure removes all of your Experimental Visual Studio packages. Afterwards, you will need to rebuild any that you want to use in an experimental instance of Visual Studio.

To clean up the experimental hive

  1. From the Windows Start menu, choose Visual Studio 2005 SDK and then Reset the Visual Studio 2005 Experimental hive.

  2. Next, clear out old template items. From the Windows Start menu, click My Documents and navigate to \Visual Studio 2005\Templates\ItemTemplates. This directory is for experimental templates: it is therefore generally safe to remove the whole directory tree. (Installed packages put their templates elsewhere.) If you wish to check on what you are removing, you should find the old templates under the CSharp and VisualBasic folders.

It is generally not necessary to remove items from the Global Assembly Cache if they have been removed from the registry. The benefit is reclamation of some disc space, and a very small performance improvement.


Removing the wrong package by mistake will cause a malfunction in some other part of your system, which may be difficult to correct.

However, if you wish to remove old language packages from your Global Assembly, use the following procedure:

To clean up the Global Assembly Cache

  1. Open a file system browser by choosing My Computer from the Windows Start menu, and navigate to \Windows\assembly.

  2. Scroll through the list of packages and delete those that you are confident are no longer required. In general, they will start with your company name.


    The Windows Explorer's Search function does not work in the Global Assembly Cache.

Removing a Domain-Specific Language installed in the Main Hive

A domain-specific language should be appear in the Main hive only if it has been installed using a Setup installer. To uninstall it, run the installer again or use the Add/Remove programs Control Panel.

Note   If experimental languages are appearing in the main hive, check that you have not removed the "-h Exp" from the build command in the Dsl or DslPackage project properties.

See Also