dotnet / dotnet/sdk

Support for `#:ref` / `#:project` references in Source Generators

Open
#54,998 4 comments 0 reactions 0 assignees View on GitHub
Area-run-file untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

When using FBA in C#, we can reference other projects with
`#:ref` or `#:project` directives.

However, when developing Source Generator Analyzers, it is unclear how to
consume or recognize these references. I would like to know:

How can a Source Generator access metadata/symbols from projects referenced via `#:ref` or `#:project`?
Is there existing support for this scenario, or is it planned for future SDK updates?
Currently, I could not find documentation or samples that explain this integration.
If this is not supported yet, I would like to request feature support so that
Source Generators can properly work with FBA project references.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by investigating how FBA `#:ref` and `#:project` directives are processed and how Source Generator Analyzers receive referenced project metadata or symbols. No files, tests, or entry points are named; determine whether support already exists, then identify the SDK behavior or documentation needed to make the integration clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.