CLI produces invalid T4 template
See original GitHub issueGet 2 errors when generate db scheme using CLI with a default (unmodified) T4 template created by the CLI.
T4 compilation failed:
(123,108): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
(123,29): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
(142,64): error CS0246: The type or namespace name 'EntityModel' could not be found (are you missing a using directive or an assembly reference?)
(159,73): error CS0246: The type or namespace name 'StoredProcedureModel' could not be found (are you missing a using directive or an assembly reference?)
(176,71): error CS0246: The type or namespace name 'TableFunctionModel' could not be found (are you missing a using directive or an assembly reference?)
(191,72): error CS0246: The type or namespace name 'ScalarFunctionModel' could not be found (are you missing a using directive or an assembly reference?)
(206,75): error CS0246: The type or namespace name 'AggregateFunctionModel' could not be found (are you missing a using directive or an assembly reference?)
(222,69): error CS0246: The type or namespace name 'AssociationModel' could not be found (are you missing a using directive or an assembly reference?)
Environment details
linq2db version: 4.0.0 Database Server: Postgres Operating system: macOS .NET Framework: 6.0.101
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
c# - T4 Templates outputting wrong data
Go to your file in Solution Explorer. Right click -> Properties. In the properties window change the value of "Custom Tool" to ...
Read more >Design-Time Code Generation by using T4 Text Templates
Learn how design-time T4 text templates let you generate program code and other files in your Visual Studio project.
Read more >Run-Time Text Generation with T4 Text Templates
Learn how you can generate text strings in your application at run time by using Visual Studio runtime text templates.
Read more >[accepts invalid] binding template template arguments with ...
S should not match template_ s template argument (yet no error is generated by MSVC). gcc and clang reject this code. C++cppcompiler.
Read more >T4 Models
T4 models are used to generate POCO's C# code using your database structure. Installation. First you should install one of packages with T4...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Feel free to send PR 😃
BTW, thanks for trying new tool. If you have any feedback, please provide it here here https://github.com/linq2db/linq2db/discussions/3531