Open ThomasHeijtink opened 3 days ago
There is no way to pass this information along. The product of one compilation is a dll, and it's only that dll that is passed to the downstream compilation.
Note that that dll may not even include IL (it may just be metadata in the case of a ref assembly). So all you have are the types and members signatures to work off of.
Yes, you told me. But that doesn't mean it can't be made possible.
Maybe it wasn't clear that this is a feature request.
After building one project, MSBuild could keep it in memory and pass it to the next project it builds, right?
Since building a project also kicks-off and awaits for building referenced and transitive projects. Wouldn't it make sense to also allow source generators to have access to the syntax of down stream projects as well? Or at least make it configurable from the host/target project which of the down stream projects you want to include as source projects. Or allow the source generator to filter projects based on certain expressions.
For example, we have code in our domain layer for which we want to generate code in our application layer. This seems not to be possible with the out-of-the-box design and probably would require custom tooling and/or build actions to achieve this.