-
Notifications
You must be signed in to change notification settings - Fork 34
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
AD0001: Occasional InvalidOperationException error in analyzer in IDE #794
Comments
Here's a larger chunk of errors:
|
Looking at the stack trace and code, this could indicate that you reference nunit.framework more than once. I agree it shouldn't throw an exception, so I will change the code to not use .Single |
Through using (import) statements? That might be the case, but I'm not seeing any particular duplicates there in our files, we are generally adding the using statements through "global using". |
No, multiple Package reference of the NUnit nuget package. Possible error source line |
We are having projects that depends on projects where both reference nunit directly, so that is certainly possible. |
I'm not entirely sure what reproduces this, however I do occasionally get a ton of these analyzer errors in the same file:
It only seems to happen in my IDE (At least I have never seen it happen when doing
dotnet build
), and it usually goes away pretty fast. I would guess it happens because of some code that is invalid for a short moment. When the error occurs the entire screen overflows with errors at once.I can't send you a file it happens on, as I cannot share code from work, but it seems to usually be larger test files.
NUnit version: 4.2.2
NUnit.Analyzers version: 4.4.0
Using JetBrains Rider with dotnet version 8.0.303.
I'm sorry that it's not a whole lot to work from :(
The text was updated successfully, but these errors were encountered: