DryIoc icon indicating copy to clipboard operation
DryIoc copied to clipboard

Improve source package with T4 install experience

Open dadhi opened this issue 5 years ago • 19 comments

  • Automate manual step of copying T4 files
  • Automate copying of package dependencies

https://github.com/NuGet/Home/issues/4837

dadhi avatar Jan 18 '20 19:01 dadhi

Replacing T4 is also a good alternative.

dadhi avatar Jan 20 '20 16:01 dadhi

Related #101

dadhi avatar Jan 20 '20 16:01 dadhi

Consider https://github.com/AArnott/CodeGeneration.Roslyn

dadhi avatar Jan 22 '20 05:01 dadhi

Consider using mono t4 implementation which is actively developed and can be referenced as a CLI tool: https://github.com/mono/t4

dadhi avatar Feb 15 '20 15:02 dadhi

Or may be this: https://github.com/Muchiachio/Genny

dadhi avatar Feb 15 '20 16:02 dadhi

Use https://github.com/Konard/T4GenericsExample as an example with https://github.com/mono/t4 CLI tool reference

dadhi avatar Mar 08 '20 12:03 dadhi

Related https://github.com/mono/t4/issues/70

dadhi avatar May 04 '20 06:05 dadhi

Another good doc to check https://medium.com/@christopher.r.froehlich/code-generation-fail-an-all-the-kings-horses-tragedy-36dcd412ad05

dadhi avatar Jul 03 '20 08:07 dadhi

Another example with step by step guide working on .NET Core 3.0 https://github.com/dadhi/T4Sample

dadhi avatar Jul 05 '20 17:07 dadhi

T4 nuget package http://diegogiacomelli.com.br/deploying-a-t4-template-with-dotnet-pack/

dadhi avatar Jul 05 '20 20:07 dadhi

Content-only NuGet package: https://medium.com/@attilah/source-code-only-nuget-packages-8f34a8fb4738

dadhi avatar Jul 22 '20 06:07 dadhi

The POC solution is here https://github.com/dadhi/LempTest

dadhi avatar Aug 14 '20 10:08 dadhi

T4 can be now replaced with Source Generators I used with Scriban as template engine and work well!

danielmeza avatar May 11 '21 05:05 danielmeza

Here is another template project for the source generators https://github.com/tom-englert/LogMessageGenerator/

dadhi avatar Apr 14 '22 09:04 dadhi

Is this actually finished or closed by pattern in last commit?

sqeezy avatar Dec 25 '23 08:12 sqeezy

@sqeezy Closed because of closing of the related PR, but the work is not completed.

The main problem is the good and reliable NuGet installation and setup experience. Currently, it is not possible to automatically install and update the package with comp-time DryIoc.

So I am currently looking at BuildTasks provided by mono T4 https://github.com/mono/t4/blob/main/Mono.TextTemplating.Build/readme.md

I will try to wrap up some deliverable CompTime for v6 and proceed working on the improving the DX for it.

dadhi avatar Dec 25 '23 10:12 dadhi

As always, thanks for your amazing work. I will look into this comp-time work next year. I'm not too familiar with T4 but pretty fluent in MSBuild related things.

sqeezy avatar Dec 25 '23 10:12 sqeezy

Today I cloned the repo onto my Macbook and immediately ran into issues building due to restoring T4 bits. I'm not sure how to proceed, so I'm curious if this issue covers my issue, or if there is other guidance in order for me to get DryIoc building locally?

ChaseFlorell avatar Apr 09 '24 20:04 ChaseFlorell

@ChaseFlorell Hi

  • How did you build?
  • What exact errors did you get?

dadhi avatar Apr 10 '24 09:04 dadhi