次の方法で共有


Changing the file extension in a Domain Specific Language Tools Designer

I recently changed the file extensions in a couple of our Domain Specific Language designers and thought it worth noting the files that need to be modified to make it all work:

 

Files to rename:

 

  • Debugging\Empty.$Extension$
  • Debugging\Sample.$Extension$
  • Designer\ItemTemplates\$Extension$.$Extension$

 

Files to modify:

 

  • Debugging\$LanguageName$Debugging.csproj
  • Debugging\$LanguageName$Report.ReportTemplate
  • Debugging\$LanguageName$ReportVB.ReportTemplate
  • Designer\$LanguageName$Designer.csproj
  • Designer\Diagram\$LanguageName$Designer.resource.resx
  • Designer\ItemTemplates\CS.vstemplate
  • Designer\ItemTemplates\VB.vstemplate
  • Designer\Shell\Constants.dslddt
  • DesignerUI\DesignerUI.rc

 

The filenames may not be exactly these, depending on which template you originally used, but this should give you a good idea.  You can either modify the project file by loading the projects and adding and removing the new and old files, or by editing the .csproj files directly in a text editor.  The VSEdit Powertoy is invaluable for treating Visual Studio like Notepad from the command line.