Question

I installed the tangible t4 editor extension in vs2010 that gives some basic syntax colouring for t4 templates (.tt).

When I add a t4 template via the wizard it opens with syntax colouring.

After closing the file and double-clicking it opens again with syntax colouring.

After closing the file and using the 'open with' menu and choosing the default: 'automatic editor selection', it opens with xml file syntax colouring.

That's strange because I always assumed that double-click equals the default 'open with' menu item. Do you know what's going on?

The problem arises when one adds a t4 template without using the wizard - no syntax colouring.

No correct solution

OTHER TIPS

The solution that I know of is to edit the project file.

The templates with the <SubType>Designer</SubType> element will not open in the tangible t4 editor by default.

Change from this

<None Include="Content\Data\ContentDomain\Context.tt">
  <Generator>TextTemplatingFileGenerator</Generator>
  <LastGenOutput>Context.vb</LastGenOutput>
  <SubType>Designer</SubType>
  <CustomToolNamespace>Content.Data</CustomToolNamespace>
</None>

to this

<None Include="Content\Data\ContentDomain\Context.tt">
  <Generator>TextTemplatingFileGenerator</Generator>
  <LastGenOutput>Context.vb</LastGenOutput>
  <CustomToolNamespace>Content.Data</CustomToolNamespace>
</None>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top