This visual studio extension provides a custom tool that builds and runs a selected project in the current solution and asks it to generate code.
hediet/ext-vs-ProjectAsCustomTool
Provides a custom tool that enables to use projects in the active solution for code generation.
C#MIT