Skip to content

Pack SampSharp analyzer packages as Roslyn analyzers (not regular libs) - #570

Merged
ikkentim merged 2 commits into
mainfrom
copilot/fix-analyzer-packages-issue
May 16, 2026
Merged

ikkentim merged 2 commits into
mainfrom
copilot/fix-analyzer-packages-issue

Conversation

Copilot AI commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Analyzer-oriented packages (SampSharp.SourceGenerator, SampSharp.Analyzer, SampSharp.CodeFixes) were being packed like normal libraries, so consumers did not get them under Dependencies → Analyzers. This updates package layout so NuGet/VS consume them as analyzers/source generators.

  • Packaging layout corrected for analyzer consumption

    • Updated all three projects to stop packing build output into lib/*.
    • Explicitly pack each assembly into analyzers/dotnet/cs.
  • Analyzer-package defaults aligned

    • Disabled symbol package output for these analyzer-only packages.
    • Disabled package analysis warnings that assume lib/ref assets for runtime libraries.
  • Projects updated

    • src/SampSharp.Analyzer/SampSharp.Analyzer.csproj
    • src/SampSharp.SourceGenerator/SampSharp.SourceGenerator.csproj
    • src/SampSharp.CodeFixes/SampSharp.CodeFixes.csproj
<PropertyGroup>
  <IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<ItemGroup>
  <None Include="$(OutputPath)$(AssemblyName).dll"
        Pack="true"
        PackagePath="analyzers/dotnet/cs"
        Visible="false" />
</ItemGroup>

Copilot AI changed the title [WIP] Fix NuGet packages not being added as analyzers Pack SampSharp analyzer packages as Roslyn analyzers (not regular libs) May 15, 2026
Copilot AI requested a review from ikkentim May 15, 2026 19:19
@ikkentim
ikkentim marked this pull request as ready for review May 16, 2026 09:22
@ikkentim
ikkentim merged commit f6838a7 into main May 16, 2026
2 checks passed
@ikkentim
ikkentim deleted the copilot/fix-analyzer-packages-issue branch May 16, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NuGet packages not being added as analzyers for user of package

2 participants