@Kaligoth Its been vacation time, so that’s the reason why ive been away.
My time working in this area we have been pushing for a more standardized solutions, that takes time to do but we also want to enable you guys to use features like Source Generators, and not to wait years until we are back at where we should be. Myself as a C#/.NET developer would expect standardized solutions, so understand your frustration.
The current solution is a solution that will be easy to transition to the csproj SDK with globbing of what Analyzers that the csproj is including. Adding that information in Project Settings will not, and will also by result not trigger our recompilation if those files are change/removed/added because of how the compilation pipeline are driven, and would delay work like the Dotnet modernization initiative we are working on, fx. move to csproj/msbuild compilation and move from Mono to CoreCLR.
We cant parse all additional files to every compilation(.dll), as that would mean that all internal caches in Roslyn would be invalidated if just one of them has changed.
The suggestion to use csc.rsp is a workaround, workarounds are not meant to be great but to unblock. csc.rsp will fx. not recompile if the additional file itself changes. That would enable you to add additional files that dont use the .add file. In Csproj’s you also need to specify what AdditionalFiles to add.
Im surprised you are saying 2021.3.13f1
do not work. Ill get someone to validate that, I only checked the code and release tags if it was included or not.
To confirm, yes Unity today do not use the generated csproj’s to compile with, its driven by the ADB, a custom pipeline to calculate the graph and in the end invoke Roslyn command line. Csproj’s are only there for the IDE experience, and that’s what we want to get away from, where you can maintain your own csproj’s, so you are in control of fx. AdditionalFiles, or extra build steps.