I've been working on a project where I want to read xml or json file and generate exception files off of it. I looked into different options which are mainly working for .Net framework but not .NetCore nor .Net6.
1- XSLT 1.0 (supported but no XSLT 2.0 nor 3.0 except you use third parties)
2- T4 template (Working only for .Net framework according to this.
3- Source Generators, which tediously require developers to restart visual studio to generate code every time they change their generator code. According to this. This means that you can't see the newly generated code until you restart visual studio. Any solution/workaround to this issue? I can't get this to work as I expected, I need to generate code and build it as part of my solution build.
The requirement I need to meet is to support .Net Core 3.1 or .Net 6 as well but we can't go with older versions. Also, I need to have control over specifying the access modifier for the fields in the generated code. Any suggestions?