Freigeben über


How to: Remove a Domain-Specific Language

When you create a domain-specific language, it is registered in the experimental hive in the Visual Studio section of the registry. Experimental hive registration is the standard method in the Visual Studio 2008 SDK of developing packages. This method guarantees that when you start Visual Studio outside of the experimental hive, experimental and possibly faulty packages will not interfere. You can use the experimental hive only when you start Visual Studio by using the Run command from a domain-specific language solution or by clicking the Start Visual Studio under Experimental hive command. To display the Run command, click Start, point to All Programs, point to Microsoft Visual Studio 2008 SDK, point to the command for the version that is installed (for example, 2006.12), and then point to Tools.

Experimental packages for domain-specific languages appear in the following locations:

  • The experimental hive in the Visual Studio section of the registry, which is located at:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp

  • The Item Templates folders under:

    My Documents\Visual Studio 2008 Templates\ItemTemplates

  • The global assembly cache, which contains copies of the built assemblies. In general, you do not need to remove packages from the global assembly cache if they have been removed from the registry.

The following actions automatically remove or replace old language packages from the experimental hive:

  • If you create a domain-specific language by using the New Project dialog box, the system automatically removes old languages that have the same file name extension.

  • If you create a domain-specific language that has the same solution name as an existing solution, the system automatically replaces the earlier version.

In addition, you might want to manually remove all your experimental packages for one or more of the following reasons:

  • Persistent "Package Load Failure" errors appear when the Visual Studioexperimental build starts. For more information, see Troubleshooting Domain-Specific Language Tools.

  • The New Item dialog box becomes cluttered with obsolete templates.

Removing all Experimental Domain-Specific Language Packages

This procedure removes all your experimental packages for Visual Studio. Afterward, you must rebuild any packages that you want to use in the experimental build.

To clean up the experimental hive

  1. On the Start menu, point to All Programs, point to Microsoft Visual Studio 2008 SDK, point to Tools, and then click Reset the Visual Studio 2008 Experimental hive.

  2. On the Start menu, click My Documents.

  3. Browse to \Visual Studio 2008 Templates\ItemTemplates, and delete its contents.

    This directory contains experimental templates. Therefore, you can generally remove the whole directory tree. Installed packages install their templates elsewhere.

    If you want to verify what you are removing, you should find the old templates under the CSharp and VisualBasic folders.

Generally, you do not need to remove items from the global assembly cache if you have removed them from the registry. However, you can reclaim some disk space. This might improve your performance.

Hinweis

If you remove the wrong package, some other part of your system might malfunction, and this situation might be difficult to correct.

To clean up the global assembly cache

  1. On the Start menu, click My Computer, and browse 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.

    Hinweis

    The Search function in Windows Explorer does not work in the global assembly cache.

Removing a Domain-Specific Language From the Main Hive

A domain-specific language should appear in the main hive only if it has been installed by using a Setup installer. To uninstall such a language, run the installer again or use the Add or Remove Programs item in Control Panel. For more information, see Deploying Domain-Specific Language Solutions.

Hinweis

If experimental languages appear in the main hive, verify that you have not removed the "-h Exp" from the build command in the properties of the Dsl or DslPackage project.

See Also

Concepts

Creating Domain-Specific Language Solutions

VSPackages

Experimental Build

Domain-Specific Language Tools Glossary