How can I include a generated code project in a Visual Studio SLN?

Viewed 26

I have a project with a single Visual Studio SLN that's made up of a number of CSPROJ files. One of those projects is an EXE (compiled from C#) that reads in a text file and churns out a .CS file based on that text file.

Decades ago, I'd have written a Makefile. Is there a way I can trigger this kind of auto generated code in Visual Studio 2022 when I press F5?

  • If I modify the text file, I'd like the EXE that generates autogen.cs to be called.
  • When autogen.cs changes, I'd like autogen.dll (the DLL it compiles into) to be rebuilt.
  • When autogen.dll updates, I'd like any project referencing that DLL to be rebuilt.

(All of these projects are yet to be written, so I'm happy to rethink the way they work.)

0 Answers
Related