Skip to content

Source Generators: Allow embedding of files other than source #49935

Open
@chsienki

Description

@chsienki

We've seen from several customers the want to embed other files into the output assembly, particularly EmbeddedResources (see #49923)

We should explore an API that allows generators to add 'other' inputs to the compilation other than just source. This could be scoped explicitly to EmbeddedResources, or we might want to allow e.g. AdditionalFiles too.

Expanding it out to more types might have implications for analyzers, as they would be able to see them as well, but given that analyzers today see the generated source this seems desirable (although we might need an API that returns the provenance of the thing, such as Generated or Not).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions