question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

T4 Models Generation in .net core

See original GitHub issue

I think this readme is rly outdated. First of all it’s not understandable from where the files must be copied. I found some files in .nuget\packages\linq2db.mysql\2.6.4\content\LinqToDB.Templates, but there is just a CopyMe.MySql.tt.txt (no Core in the name).

open $(SolutionDir).tools\linq2db.t4models in Explorer

Doesn’t exists. I need to create it? Maybe, but where?

copy CopyMe.XXX.Core.tt.txt to your project’s folder or subfolder, then you should use it instead of CopyMe.XXX.tt.txt

From where I shall copy it?! No file here.

I don’t know what to do here.

EDIT: LoadMatadata() / GenerateModel() I don’t know which method do u mean.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Fruchuxscommented, Apr 8, 2019

The correct approach should be:

  • Copy CopyMe.MySql.tt.txt from %userprofile%\.nuget\packages\linq2db.mysql\<linq2db version>\content\LinqToDB.Templates to destination folder and rename it to *.tt
  • Open File in Visual Studio and edit Connection Data at the end of the file
0reactions
MaceWinducommented, Apr 7, 2019

For a moment you made me scared that Microsoft changed T4 in VS2019 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Generation and T4 Text Templates - Visual Studio ...
In Visual Studio, a T4 text template is a mixture of text blocks and control logic that can generate a text file.
Read more >
Code Generation: Connecting T4 to Entity Framework Core
T4 is one code generation/templating solution that can help us solve this problem. Since we'll be using .NET Core as our project type, ......
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 >
Using EDMX file and T4 in .NET Core to Generate Code ...
Hello there! I am going to briefly show you how we can use existing EDMX files from EF 6 to generate code in...
Read more >
Using T4 templates in Entity framework
T4 stands for Text template transformation toolkit which is a template-based code generation engine built into Visual Studio.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found