Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-t4: Default extension is .txt when -c is specified #130

Closed
bricelam opened this issue May 3, 2022 · 1 comment
Closed

dotnet-t4: Default extension is .txt when -c is specified #130

bricelam opened this issue May 3, 2022 · 1 comment
Labels

Comments

@bricelam
Copy link

bricelam commented May 3, 2022

When preprocessing a template...

t4 -c MyTemplate MyTemplate.tt

...it uses the .txt extension. This forces me to also specify the -o option. (Leading to lots of redundancy.)

t4 -o MyTemplate.cs -c MyTemplate MyTemplate.tt

As stated in #128, Visual Studio will peak at the template directive and use .cs for C# and .vb for VB.

@mhutch mhutch added the bug label Oct 4, 2022
@mhutch
Copy link
Member

mhutch commented Oct 4, 2022

Yes, definitely makes sense to default to a code extension when generating a class :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants