-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API Compat] Not targeting .NET 8 framework in versions 8.* #43801
Comments
@dotnet/area-infrastructure-libraries a new issue has been filed in the ApiCompat area, please triage |
That's intentional in #38485 |
That means that .NET 8 base containers can't run Api Compat without having the .NET 6 runtime installed? |
Well my comment was only for the net9 rc version of the tool. But IIRC an option was added to |
The For older SDKs, you can use the DOTNET_ROLL_FORWARD environment variable. |
As for why Microsoft.DotNet.ApiCompat.Tool 8.0.402 targets .NET 6, I don't know the official reason but I'd guess that they wanted to have some version of the tool runnable on .NET 6 LTS until that goes out of support; no 6.* version of the tool was published; the 7.* versions of the tool were built as part of .NET SDK 7 which is already out of support; so the responsibility falls to 8.* versions of the tool. They could have made it multitarget .NET 6 and .NET 8 though. |
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.
Installing the .NET 6 runtime makes the tool work (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:

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:

I realize I might be missing something, but I would like to understand the rationale or reasons behind this discrepancy. Can you help?
The text was updated successfully, but these errors were encountered: