-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Description
- Source generator DLLs were missing from NuGet packages because
PackAsAnalyzer="true"is a custom convention fromdotnet/runtimethat is not part of the .NET SDK and was silently ignored - Consumers of NuGet packages had no source generation capability because the analyzer DLLs were not included in the
analyzers/dotnet/cs/folder - Need to implement the convention properly in the build system to ensure generators are packaged correctly
Deliverables
- Build-time resolution: Create MSBuild target that sets
OutputItemType=Analyzeron ProjectReferences marked withPackAsAnalyzer="true"before compilation - Pack-time inclusion: Create MSBuild target that resolves generator DLLs via
GetTargetPathand includes them inanalyzers/dotnet/cs/folder in NuGet packages - Global application: Import the new targets in
Directory.Build.propsso all projects usingPackAsAnalyzerautomatically benefit from the convention
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels