-
Notifications
You must be signed in to change notification settings - Fork 26
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
Version 4.0.5 seems incompatible with .NET 6 #479
Comments
What Visual Studio version are you using? |
I'm using JetBrains Rider (2023.1) and also just the plain |
The error message suggests that the local tooling version is too low. Analyzer looks for 4.5.0 but most recent found is 4.3.0. |
It builds fine with latest version of Visual Studio |
Indeed, I've just tried opening the same project in VS, and it works fine. We're running our build loop on Linux machines, so we cannot use VS there. I tried running |
I don't think it is a framework issue but rather a tooling issue with compiler version. |
I'll try to create a reproducer a bit later today, but just thought it would be worth mentioning that we restrict the project to a .NET 6 SDK by placing the following in {
"sdk": {
"version": "6.0.0",
"rollForward": "latestFeature"
}
} |
I guess I was too early updating version, probably better to lag a couple of versions to let tooling on build servers etc. catch up. |
FWIW, here is a reproducer project: https://github.com/canon-benoit-lecardonnel/ReproIDisposableAnalyzers479 When writing this reproducer, I noticed that this issue is only reported as a warning by default. I had to enable I did not manage to make it work from the dotnet CLI (although I did not look for a long time). So it would be great to go back to a previous version indeed, especially since .NET 6 is still under active support by Microsoft until November 2024. |
There is a way to use a specific compiler version, though you take on the responsibility of manual control of the compiler version this way, and this may stop working in the future; the package has disclaimers:
|
I can report the same problem trying to use the newer versions and building on an Arch Linux installation directly via The official SDK download page lists the Visual Studio support versions as "Visual Studio 2022 (v17.4)" and "Visual Studio 2022 (v17.0)" respectively. |
This solution unfortunately does not work for us with |
Issue is related to dotnet/sdk#32598 and dotnet/format#1546 |
Hi there,
We tried updating to version 4.0.5 of
IDisposableAnalyzers
, but get an error duringdotnet build
:This is with the most recent version of the .NET 6 SDK: v6.0.407.
With
IDisposableAnalyzers
4.0.4, everything is fine.Maybe something changed recently in this project? Unfortunately, I could not find a way to see the diff between 4.0.4 and 4.0.5.
The text was updated successfully, but these errors were encountered: