Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

IMPORTANT: Remove analyzers from Visual Studio/VS Code extensions #1172

Open
@josefpihrt

Description

@josefpihrt

Summary

At the beginning it seemed like a good idea to include analyzers in the IDE extensions. Analyzers were available in every project/solution without necessity reference in every project/solution.

The main issue is that the analyzers are "bound" only to the IDE, diagnostics will be displayed in the IDE but not during build, command-line build or CI build.

The desired state is that analyzers are "bound" to the project/solution, regardless of the IDE or extension installed.

Best Practice

  • Install extension to have refactoring and code fixes for compiler diagnostics.
  • Install NuGet package(s) with analyzers.
    • Add package reference to yourDirectory.Build.props file which is located at the root of your repository.

Directory.Build.props

<ItemGroup>  <PackageReferenceInclude="roslynator.analyzers"Version="<VERSION>">    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>    <PrivateAssets>all</PrivateAssets>  </PackageReference>  <PackageReferenceInclude="roslynator.formatting.analyzers"Version="<VERSION>">    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>    <PrivateAssets>all</PrivateAssets>  </PackageReference></ItemGroup>

When it will be removed?

Probably the best opportunity would be a moment when a new major version of Visual Studio is released. It usually means that major version of Roslynator is released as well.

Depending on when the next major version of VS will be released, analyzers could be removed from extension earlier, but not at least several months after this announcement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp