Skip to content

rokstep-analyzers

NuGet version

GitHub source

Status: alpha

Install

Terminal window
dotnet add package Rokstep.Analyzers

Or in a csproj:

<PackageReference Include="Rokstep.Analyzers" Version="0.2.0-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

What this is

A Roslyn diagnostic analyzer that emits the 42 RKS**** diagnostic IDs at build time for every usage of an obsolete API in the three shim packages. Covers all 42 diagnostic IDs across rokstep-elmah-shims, rokstep-adal-shims, and rokstep-ninject-shims.

Usage

  1. Install the shim package (Rokstep.Elmah.Shims, Rokstep.Adal.Shims, or Rokstep.Ninject.Shims).

  2. Install Rokstep.Analyzers alongside.

  3. Build. Every shimmed API emits a diagnostic like:

    warning RKSEL0001: ErrorLog.GetDefault() is obsolete. See https://dev.rokstep.eu/migrations/RKSEL0001/
  4. Follow the link to the migration guide.

CHANGELOG

See github.com/rokstep/analyzers/blob/main/CHANGELOG.md.