dotnet / dotnet/msbuild

Allow a project to describe how it should be referenced

Open
#11,882 1 comment 1 reaction 0 assignees View on GitHub
needs-design Priority:3 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Today, if you want to reference a code generator and use it, you need to do something like

```xml

```

in each referencing project.

But you know in the project that it's a source generator! It'd be great if you could guide the default consumption of the `ProjectReference` from within the project.

Roslyn has considered adding a `SourceGeneratorProjectReference` to simplify this (https://github.com/dotnet/roslyn/pull/66974) but it is complicated enough that it'd be better as an MSBuild feature.

Ideally a project would be able to influence

* `TargetFramework` negotiation
* `IsRidAgnostic`
* `OutputItemType`

and possibly other things.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.