Analysis in .NET Core Projects Produces Different Results #47913
Replies: 1 comment 1 reply
-
The core issue here is that the analyzers are disabled for live analysis: <RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild> If user just executes one of the "Build" command or "Run Code Analysis" command, we end up with equal number of warnings from both. However, we don't seem to handle diagnostic de-duping between diagnostics from build and run code analysis commands, so "Build + Intellisense" shows duplicates. When any diagnostic is clicked to open a file, de-dupe gets performed and one of the duplicates is removed. Unfortunately, diagnostics coming from "Run Code Analysis" when
|
Beta Was this translation helpful? Give feedback.
-
This issue has been moved from a ticket on Developer Community.
After setting up code analysis in .NET Core, it's supposed to run analysis on every build. It does not seem to since the number of issues is a lot smaller than if I ran Code Analysis on Solution.
Also, sometimes if I click on a violation and go to the code, all of a sudden many violations just dissapear (without me changing anything).
Original Comments
Feedback Bot on 6/23/2020, 00:11 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Feedback Bot on 6/23/2020, 09:58 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.
Feedback Bot on 7/31/2020, 00:19 AM:
I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.
David McCarter on 8/3/2020, 08:08 AM:
My passion is code quality and not fixing this makes no sense. I will try to get more votes!
Manish Vasani [MSFT] on 8/3/2020, 08:28 AM:
@David McCarter would you be able to provide a more concrete repro, with expected and actual set of diagnostics? Also note that VS IDE comes with some in-build Code Style analyzers (IDExxxx diagnostics), which are by default only executed in VS IDE and not on command line build. You would need to manually install the CodeStyle NuGet package and configure the severity of IDExxxx diagnostics to warning/error for them to be reported at build time: https://dotnet.myget.org/feed/roslyn/package/nuget/Microsoft.CodeAnalysis.CSharp.CodeStyle (currently a pre-release package)
Feedback Bot on 8/12/2020, 01:02 AM:
We will close this report in 14 days because we don’t have enough information to investigate further. To keep the problem open, please provide the requested details.
David McCarter on 8/12/2020, 08:30 AM:
Yes, you can look at my open-source assembly here:
https://github.com/RealDotNetDave/dotNetTips.Utility.Core/releases/tag/2020.8.9
I have also reproduced the same issue in other projects.
David
Feedback Bot on 9/21/2020, 00:13 PM:
This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.
Manish Vasani on 9/21/2020, 02:46 PM:
Thanks for the repro. I am going to port it to github and add more context on the issue.
Original Solutions
(no solutions)
Beta Was this translation helpful? Give feedback.
All reactions