Skip to content

Package Cratis.Architecture.CodeAnalysis as a Roslyn analyzer#11

Open
woksin wants to merge 1 commit into
mainfrom
chore/package-analyzer-for-publishing
Open

Package Cratis.Architecture.CodeAnalysis as a Roslyn analyzer#11
woksin wants to merge 1 commit into
mainfrom
chore/package-analyzer-for-publishing

Conversation

@woksin

@woksin woksin commented Jun 19, 2026

Copy link
Copy Markdown

Summary

Makes the Cratis.Architecture.CodeAnalysis package install correctly as a Roslyn analyzer so the publish workflow produces a usable package.

Fixed

  • The Cratis.Architecture.CodeAnalysis package now ships the analyzer in analyzers/dotnet/cs (targeting netstandard2.0) instead of lib/, so the analyzers actually load and run in consuming projects and IDEs.

Configure the project to pack as a proper analyzer so the publish workflow
produces a usable NuGet package: target netstandard2.0, set
IncludeBuildOutput=false and DevelopmentDependency, and pack the assembly into
analyzers/dotnet/cs instead of lib/.

Targeting netstandard2.0 requires a few compatibility fixes: add minimal
System.Index/System.Range polyfills for the range operators and replace char
overloads of string.Split/Join/Replace/StartsWith not available on
netstandard2.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@woksin woksin added the patch label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant