Skip to content

Analyzer false positive when .csproj name differs from repository name #23

@davidnmbond

Description

@davidnmbond

Summary

PanoramicData.NugetManagement appears to raise false positives for package metadata when a repository contains a .csproj whose name does not match the repository/package name.

Repro

Repository: panoramicdata/PanoramicData.SshServer

In this repo:

  • PanoramicData.SshServer/PanoramicData.SshServer.csproj is the actual NuGet package project and already contains package metadata such as:

    • PackageProjectUrl
    • PackageIcon
  • ExampleApp/ExampleApp.csproj is a sample executable project:

    • OutputType = Exe
    • IsPackable = false

However, the analyzer reports governance issues against ExampleApp/ExampleApp.csproj for missing PackageProjectUrl and PackageIcon.

Expected

The analyzer should not require package metadata for non-package/sample projects, especially where:

  • the project is marked IsPackable=false, and/or
  • the .csproj name does not match the repository/package identity.

Actual

The analyzer appears to assume the project should carry package metadata based on repo-level expectations, producing false positives on ExampleApp.csproj.

Suggested fix

Adjust the analyzer logic so it does not infer package metadata requirements solely from repository context when:

  • the project is marked IsPackable=false, or
  • the project name does not correspond to the repository/package identity.

At minimum, the non-matching .csproj case should not be treated as the primary package project by default.

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