language-ext: How are we supposed to use code gen now that CodeGeneration.Roslyn.BuildTime is no longer maintained?
I’ve been playing around with code gen, which is very powerful, but am not sure how we are supposed to use it. If you add the LanguageExt.CodeGen package to a project, you get a message telling you to use CodeGeneration.Roslyn.BuildTime, but if you look at the project page for that package, it says right at the top…
This project is no longer maintained now that Roslyn offers source generators…
I looked at the link to the announcement about source code generators, as well as the example migration, but to be honest, neither of them made much sense to me. I’m not interested in writing a source generator, I just want to be able to use this one.
What is the recommended way of setting up your project nowadays? I tried the (presumably outdated) way shown in LanguageExt’s documentation, which still works, but I’m nervous about relying on a package that is not maintained, especially if Roslyn now supports this out of the box.
To compound this problem, I tried committing a project which uses CodeGeneration.Roslyn.BuildTime to a GitHub repository, but the build failed with the message…
C:\Users\runneradmin.nuget\packages\codegeneration.roslyn.buildtime\0.6.1\build\CodeGeneration.Roslyn.BuildTime.targets(73,5): error CGR1001: CodeGeneration.Roslyn.Tool (dotnet-codegen) is not available, code generation won’t run. Please check https://github.com/AArnott/CodeGeneration.Roslyn for usage instructions.
Given that the code builds locally, and includes references to the required packages, why won’t it build on GitHub?
Some guidance would be greatly appreciated. Thanks
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 21 (18 by maintainers)
Version 4 isn’t far away, just need to build a few more unit tests!