-
Notifications
You must be signed in to change notification settings - Fork 392
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
Enable code analysis #988
Comments
Thanks - by Code Analysis here, you're looking to use FxCop and not C#/VB's automatic analysis? |
Yes, FxCop on a library targeting net20 and netstandard1.3. |
1. Mimic the behavior of native project system to load stancore package for code analysis, if installed. 2. Turn on the CodeAnalysis specific global build properties for enabling FxCop when build is invoked from Run Code Analysis. Fixes dotnet#988
Really milestone 16.0? We need FxCop mainly for CA2000 which still has no replacement (I'm aware of). See dotnet/roslyn-analyzers#476. |
If you are using custom rules, and custom analyzers as Visual Studio extensions, you need to edit the csproj file and add
in the to match the behavior of the .net Framework projects. (from https://stackoverflow.com/a/44726528/444469) Would be nice to be able to edit this property in the project properties, as the analyzers will default to their own configuration without the correct value. |
Let's review this together in the next triage session. Running Analyze > Run Code Analysis > On Solution shows that analysis is running in the status bar, but no results are produced. This occurs in both project systems, so I cannot see what action is needed here. I may misunderstand the feature though. Running Analyze > Configure Code Analysis > For Solution shows:
|
@drewnoakes That command now runs installed analyzers. Can you try to install an analyzer package to the project and retry? |
I think we can close this; the FxCop and other source-based analyzers have replaced binary analysis that this used to perform, see: https://docs.microsoft.com/en-us/visualstudio/code-quality/migrate-from-legacy-analysis-to-fxcop-analyzers?view=vs-2019. |
Yes, the FxCopAnalyzers package has totally replaced my need for this. |
In build 15.0.26014.0:
The text was updated successfully, but these errors were encountered: