-
Notifications
You must be signed in to change notification settings - Fork 74
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
Compilation failure #139
Comments
I'm away from a PC for a week, so I can't help much right now. Suggestions:
|
Thanks @davidebbo I edited the question to use text for the errors. It's not the blank line or the line ending. I tried updating to only a Windows line ending (CRLF i.e. \r\n), and I get the same errors. |
@davidebbo you were on the right lines with the long shot thanks. Compilation works for the same code commit, for another developer using the same Visual Studio and T4MVC versions. It doesn't appear to be a line ending issue, it looks like another config issue local to my environment. I'm using Windows, and I tried removing all trailing characters at the end of the .tt file. I also tried inserting only CRLF as the only trailing characters. I also tried this, to renormalize all of the line endings across my local repo to CRLF:
I tried the 'Run custom tool' option again via Visual Studio, but got exactly the same error messages. I've updated the StackOverflow post on the issue - https://stackoverflow.com/questions/74845423/why-am-i-getting-the-error-errorgeneratingoutput-when-compiling |
Sorry, I'm not sure what could be going on. I'd suggest trying to minimize. e.g. does 'Run custom tool' work for you if you remove almost everything from the template file? If you see the same problem with a minimal template, then at least we know it's a T4 issue and not T4MVC specific. |
I'm working on a project that uses T4MV, with the latest versions of the T4MVC and T4MVCExtensions nuget packages (v4.2.4)
When I rebuild the project in VS2022, I get an error for
T4MVC.cs
:T4MVC.cs
only containsErrorGeneratingOutput
I'm getting error in controllers as follows. I think this is probably because T4MVC isn't compiling:
When I right click
T4MVC.tt
and choose 'Run custom tool', I see the following errors related toT4MVC.tt.hooks.t4
:I'm looking for ideas in how to diagnose the issue, or what may be causing the issue. I don't believe it's a namespace conflict, as in this Q&A
If I right-click T4MVC.tt and select
Debug T4 template
, I get other errors.Here's my
T4MVC.tt.settings.xml
file:The text was updated successfully, but these errors were encountered: