Skip to content

BC0202 triggers on NuGet property "Description" that seems like false positive? #10878

Open
@MattKotsenas

Description

@MattKotsenas

Issue Description

I'm trying out the new BuildChecks and I'm seeing BC0202 for the NuGet package property <Description>. It feels like one of two things is true. Either:

  1. This is a false positive
  2. The BuildCheck docs should be updated with additional details to explain how / why this scenario is a violation

Steps to Reproduce

git clone https://github.com/MattKotsenas/moq.analyzers
git checkout bbb213d
dotnet build /check

Expected Behavior

  • No BuildCheck warnings

Actual Behavior

  • C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(33,5): warning BC0202: https://aka.ms/buildcheck/codes#BC0202 - Property: 'Description' first declared/initialized at D:\Projects\moq.analyzers\src\Analyzers\Moq.Analyzers.csproj (19,5) used before it was initialized.

Analysis

No response

Versions & Configurations

> dotnet --version
9.0.100-rc.2.24474.11

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions