2 ms·
You certainly can have tool-generated C# files, because the GRPC protobuf compiler does that and integrates it nicely into VS projects. It's not exactly what I'
by pjc50 4y ago
You certainly can have tool-generated C# files, because the GRPC protobuf compiler does that and integrates it nicely into VS projects. It's not exactly what I'd call simple, though: https://github.com/grpc/grpc/blob/master/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets https://github.com/grpc/grpc/blob/master/src/csharp/Grpc.Too... so I'm not surprised that people don't try to spend days learning it and making it work.
One could probably write a "how to speak MSBuild for people who understand Make" page based on https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-concepts?view=vs-2022 https://learn.microsoft.com/en-us/visualstudio/msbuild/msbui... ; basically
Make -> MSBuild
Item : File (e.g. foo.c)
Target : Target (e.g. %.o:%.c)
(environment) variable : Property
tab-indented shell : Task (usually a C# assembly, although there's a generic "run command" one as well)
Free tip for anyone trying to debug MSBuild: https://msbuildlog.com/ https://msbuildlog.com/ . AFAIK there isn't anything quite as good for Make.