cezarypiatek / MappingGenerator

:arrows_counterclockwise: "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator
MIT License
1.03k stars 120 forks source link

Can I use this to generate code at compile time #79

Closed LucaGabi closed 4 years ago

LucaGabi commented 5 years ago

Hi, this is very useful project. I was wondering if I can use this to generate mapping code at build time. Something like a cli with 2 classes source & destination.

Thanks.

cezarypiatek commented 5 years ago

Hi

Maybe this could be possible to implement using this library https://github.com/AArnott/CodeGeneration.Roslyn I need to verify it because this could also solve #71

cezarypiatek commented 4 years ago

@LucaGabi Here's the working POC https://github.com/cezarypiatek/MappingGenerator/blob/feature/on_build_code_generation/MappingGenerator/OnBuildGenerator/README.md