InvalidOperationException during build
See original GitHub issueDescription
In some of my projects I get the following error when building:
CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.
My guess is that the following IsEmpty
check should happen before Peek()
:
https://github.com/fluentassertions/fluentassertions.analyzers/blob/686a33bb1cd40ea01fffeea8d4ef85e481271d32/src/FluentAssertions.Analyzers/Utilities/FluentAssertionsCSharpSyntaxVisitor.cs#L74-L78
If you need me to provide more information, let me know how and I will see what I can do.
Versions
- FluentAssertions.Analyzers 0.11.3
- .NET Framework 4.6.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
InvalidOperationException Class (System)
InvalidOperationException is used in cases when the failure to invoke a method is caused by reasons other than invalid arguments.
Read more >InvalidOperationException during dotnet/aspnetcore CI build
Special callout that this was ARM64. The log file referred to in the error message doesn't have much more info in it: UNHANDLED...
Read more >System.invalidOperationException While trying to update a ...
I'm having a problem with Entity Framework while trying to update a specific record The error message says "The property 'ID' is a...
Read more >InvalidOperationException: The build target does not ...
I think I recently changed something, but I can't find what. This comes from the Oculus Ctrl+K command. Also on the Oculus Menu...
Read more >InvalidOperationException in build only, when trying to ...
( Scene1 and Scene2 are const string s.) The program works fine when running in the Unity editor. However, when I make a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, can’t comment on that - I moved on to different things…
Meir Blachman @.***> schrieb am So., 28. Mai 2023, 04:18:
@csoltenborn is this still an issue?