Skip to content

Change the file name that source generators write into the PDB #47211

@jasonmalinowski

Description

@jasonmalinowski

Currently the filename that is written into the PDB for a source generated file is an underscore-delimited combination of:

  1. The MVID of the module containing the source generator itself.
  2. The name of the source generator.
  3. The hint file (suffixed with .cs if necessary.)

This creates a few issues for the IDE, since we need to match this naming convention to make the debugger work:

  1. The MVID means any time a generator is updated, all the existing files we have open are now invalid or need to be renamed. It also means places that show the full file name (like debugger breakpoints) have to show something which is pretty huge.
  2. Since we're using underscores as a delimiter, looking at a file name by itself makes it hard to tell what part is the generator name and what part is the hint name, since both could contain an embedded underscore.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions