I am creating a NuGet package that supplies some T4 templates to the CodeTemplates directory. When I install the NuGet package, all T4 templates have the Custom Tool property set to "TextTemplatingFileGenerator". It is not right.
I know I can disable this by changing my registry so that new T4 templates are not added that way, but since this is a NuGet package, this is not an option.
I learned PowerShell, but it's hard for me to understand what I will do to achieve my goal.
I looked at the XML .csproj file and found this:
<None Include="CodeTemplates\AddController\Controller.tt"> <Generator>TextTemplatingFileGenerator</Generator> <LastGenOutput>Controller.cs</LastGenOutput> </None>
If I remove the "TextTemplatingFileGenerator" from this node, then the file will work as I wish.
Where do I go next?
source share