dotnet / dotnet/sdk

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

Open
#43,801 6 comments 0 reactions 1 assignee Claimed by @ViktorHofer View on GitHub
Area-ApiCompat untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

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](https://github.com/user-attachments/assets/dc9cf754-e0cf-4b96-9cde-d2056d7a2ab3)

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](https://github.com/user-attachments/assets/77df6f2d-0238-42d2-8f4d-a1058b0abe39)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.