How do I get T4 Template support in Visual Studio 2015?
In VS 2015 the file property does not allow to specify the *tt file to be marked and allow to run from context menu.
I am using VS 2015 CTP6.
5
votes
2 Answers
2
votes
0
votes
As far as I can tell, the properties in the csproj
have to be correct for the t4 template debug options to show up. This works for me in vs 2015 update 1
There's two sections, the template and the output file.
<Content Include="Entities\DataGenerator.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>DataGenerator.cs</LastGenOutput>
</Content>
<Compile Include="Entities\DataGenerator.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DataGenerator.tt</DependentUpon>
</Compile>
*Note that TextTemplatingFileGenerator
is case sensitive.
Custom Tool
property is not there. – Shimmy Weitzhandler