dadhi / DryIoc

DryIoc is fast, small, full-featured IoC Container for .NET
MIT License
997 stars 122 forks source link

Improve source package with T4 install experience #212

Open dadhi opened 4 years ago

dadhi commented 4 years ago

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

dadhi commented 4 years ago

Replacing T4 is also a good alternative.

dadhi commented 4 years ago

Related #101

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

dadhi commented 4 years ago

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

danielmeza commented 3 years ago

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

dadhi commented 2 years ago

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

sqeezy commented 8 months ago

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

dadhi commented 8 months ago

@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.

sqeezy commented 8 months ago

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.

ChaseFlorell commented 4 months ago

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?

dadhi commented 4 months ago

@ChaseFlorell Hi