Skip to content

[API Compat] Not targeting .NET 8 framework in versions 8.* #43801

@dosper7

Description

@dosper7

I am building a CI/CD pipeline using a .NET 8-based container image. In this pipeline, I have a validation step where I want to check for potential breaking changes and fail if any are detected. To my surprise, when I installed the Microsoft.DotNet.ApiCompat.Tool and tried to use it, it failed because it targets the .NET 6 framework, which I do not have installed.

apicompat --version
8.0.401+41b13414c4a35aac269719f7281cf74c9c9aae31

Installing the .NET 6 runtime makes the tool work (version 6.0.33):

    wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
    chmod +x dotnet-install.sh
    ./dotnet-install.sh --runtime dotnet --version 6.0.33

Question:

Why isn't there version parity between the API Compat tool version 8.* and its dependent framework?

When I check the API Compat tool version 8.0.4 on the NuGet Package Explorer, I see it has a dependency on .NET 6:
image

If I inspect a more recent version (e.g., .NET 9 RC), I notice it depends on the latest LTS version (.NET 8), whereas I was expecting it to depend on .NET 9:
image

I realize I might be missing something, but I would like to understand the rationale or reasons behind this discrepancy. Can you help?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions