How to: Change the Namespace of a Domain-Specific Language
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
You can change the namespace of a domain-specific language. You must make the change in the DSL Explorer, in the properties of the Dsl Package project, and in the assembly information.
To change the namespace of a domain-specific language
In DSL Explorer, click the Dsl node.
In the Properties window, change the Namespace property.
Save the solution and transform the templates.
On the Project menu, click Dsl Properties.
The properties for your project appear.
Click the Application tab.
Change the Default namespace property to the new namespace name.
If you also want to change the name of the assembly, change the Assembly name property.
If you have changed the Assembly name, open DslPackage\Package.tt and update this line:
string dslAssembly = "YourDSLassembly.Dsl.dll";
If you have written any custom code, make sure to change the namespace and class references in the code files.
Reset the Visual Studio Experimental instance.
Delete \Users\{your name}\AppData\Local\Microsoft\VisualStudio\*Exp
On the Windows Start menu, choose All Programs, Microsoft Visual Studio 2010 SDK, Tools, Reset the Experimental Instance.
On the Build menu, choose Rebuild Solution.