Skip to content

Add option for "dotnet reference add" to add a reference to analyzer or source generator #15158

@svick

Description

@svick

When adding a project reference to a Roslyn analyzer or source generator, you generally want the resulting csproj to contain:

<ProjectReference Include="Analyzer.csproj" OutputItemType="Analyzer" />

Or:

<ProjectReference Include="Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />

There doesn't seem to be way to achieve this just using dotnet new reference and I think it would be nice if there was.

Metadata

Metadata

Assignees

Labels

Area-CLIhelp wantedIssues that we would accept external contributions on. Also known as up-for-grabs.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions