Vulnerabilities | |||||
---|---|---|---|---|---|
Version | Suggest | Low | Medium | High | Critical |
3.3.2 | 0 | 0 | 0 | 0 | 0 |
3.3.1 | 0 | 0 | 0 | 0 | 0 |
3.3.0 | 0 | 0 | 0 | 0 | 0 |
3.0.0 | 0 | 0 | 0 | 0 | 0 |
2.9.12 | 0 | 0 | 0 | 0 | 0 |
2.9.11 | 0 | 0 | 0 | 0 | 0 |
2.9.10 | 0 | 0 | 0 | 0 | 0 |
2.9.9 | 0 | 0 | 0 | 0 | 0 |
2.9.8 | 0 | 0 | 0 | 0 | 0 |
2.9.7 | 0 | 0 | 0 | 0 | 0 |
2.9.6 | 0 | 0 | 0 | 0 | 0 |
2.9.5 | 0 | 0 | 0 | 0 | 0 |
2.9.4 | 0 | 0 | 0 | 0 | 0 |
2.9.3 | 0 | 0 | 0 | 0 | 0 |
2.9.2 | 0 | 0 | 0 | 0 | 0 |
2.9.1 | 0 | 0 | 0 | 0 | 0 |
2.9.0 | 0 | 0 | 0 | 0 | 0 |
2.6.4 | 0 | 0 | 0 | 0 | 0 |
2.6.3 | 0 | 0 | 0 | 0 | 0 |
2.6.2 | 0 | 0 | 0 | 0 | 0 |
2.6.1 | 0 | 0 | 0 | 0 | 0 |
2.6.0 | 0 | 0 | 0 | 0 | 0 |
1.1.0 | 0 | 0 | 0 | 0 | 0 |
1.0.1 | 0 | 0 | 0 | 0 | 0 |
3.3.2 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0Windows Debug | Windows Release | Ubuntu Debug | Ubuntu Release | |
---|---|---|---|---|
main |
|
Roslyn is the compiler platform for .NET. It consists of the compiler itself and a powerful set of APIs to interact with the compiler. The Roslyn platform is hosted at github.com/dotnet/roslyn.
Roslyn analyzers analyze your code for style, quality and maintainability, design and other issues. The documentation for Roslyn Analyzers can be found at learn.microsoft.com/dotnet/fundamentals/code-analysis/overview.
Microsoft created a set of analyzers called Microsoft.CodeAnalysis.NetAnalyzers that contains the most important "FxCop" rules from static code analysis, converted to Roslyn analyzers, in addition to more analyzers. These analyzers check your code for security, performance, and design issues, among others. The documentation for .NET analyzers can be found here.
Recently the set of analyzer packages produced by this repository have been consolidated. The following table summarizes this information:
NuGet Package Name | Version | Summary |
---|---|---|
Microsoft.CodeAnalysis.NetAnalyzers | ✔️ Primary analyzer package for this repo. Included default for .NET 5+. For earlier targets read more. | |
Microsoft.CodeAnalysis.FxCopAnalyzers | ⛔ Use Microsoft.CodeAnalysis.NetAnalyzers instead. Read more. |
|
Microsoft.CodeQuality.Analyzers | ⛔ Use Microsoft.CodeAnalysis.NetAnalyzers instead. Read more. |
|
Microsoft.NetCore.Analyzers | ⛔ Use Microsoft.CodeAnalysis.NetAnalyzers instead. Read more. |
|
Microsoft.NetFramework.Analyzers | ⛔ Use Microsoft.CodeAnalysis.NetAnalyzers instead. Read more. |
Latest pre-release version (.NET8 analyzers): here
This is the primary analyzer package for this repo that contains all the .NET code analysis rules (CAxxxx) that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings.
You do not need to manually install this NuGet package to your project if you are using .NET5 SDK or later. These analyzers are enabled by default for projects targeting .NET5 or later. For projects targeting earlier .NET frameworks, you can enable them in your MSBuild project file by setting one of the following properties:
EnableNETAnalyzers
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
AnalysisLevel
<PropertyGroup>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>
NOTE: Starting version 3.3.2
, Microsoft.CodeAnalysis.FxCopAnalyzers
has been deprecated in favor of Microsoft.CodeAnalysis.NetAnalyzers
. Documentation to migrate from FxCopAnalyzers to NetAnalyzers is available here.
This is a migration analyzer package for existing binary FxCop users. It contains all the ported FxCop code analysis rules (CAxxxx). It's recommended to use Microsoft.CodeAnalysis.NetAnalyzers instead. The documentation for that can be found at learn.microsoft.com/visualstudio/code-quality/install-net-analyzers.
The documentation for all the ported and unported FxCop rules can be found at learn.microsoft.com/visualstudio/code-quality/fxcop-rule-port-status.
This analyzer package contains all the ported FxCop rules that are applicable for both .NetCore/.NetStandard and Desktop .NetFramework projects. You do not need to install any separate analyzer package from this repo to get target-framework specific FxCop rules.
NOTE: Starting version 3.3.2
, Microsoft.CodeQuality.Analyzers
, Microsoft.NetCore.Analyzers
and Microsoft.NetFramework.Analyzers
have also been deprecated in favor of Microsoft.CodeAnalysis.NetAnalyzers
. Documentation to migrate to NetAnalyzers is available here.
This package contains common code quality improvement rules that are not specific to usage of any particular API. For example, CA1801 (ReviewUnusedParameters) flags parameters that are unused and is part of this package.
This package contains rules for correct usage of APIs that are present in .NetCore/.NetStandard framework libraries. For example, CA1309 (UseOrdinalStringComparison) flags usages of string compare APIs that don't specify a StringComparison
argument. Getting started with NetCore Analyzers
NOTE: This analyzer package is applicable for both .NetCore/.NetStandard and Desktop .NetFramework projects. If the API whose usage is being checked exists only in .NetCore/.NetStandard libraries, then the analyzer will bail out silently for Desktop .NetFramework projects. Otherwise, if the API exists in both .NetCore/.NetStandard and Desktop .NetFramework libraries, the analyzer will run correctly for both .NetCore/.NetStandard and Desktop .NetFramework projects.
This package contains rules for correct usage of APIs that are present only in Desktop .NetFramework libraries.
NOTE: The analyzers in this package will silently bail out if installed on a .NetCore/.NetStandard project that do not have the underlying API whose usage is being checked. If future versions of .NetCore/.NetStandard libraries include these APIs, the analyzers will automatically light up on .NetCore/.NetStandard projects that target these libraries.
The following analyzers have moved into the Roslyn repo:
.\global.json
with "dotnet":
build.cmd
(in the command prompt) or .\build.cmd
(in PowerShell).test.cmd
(in the command prompt) or .\test.cmd
(in PowerShell).Prior to submitting a pull request, ensure the build and all tests pass using using steps 4 and 5 above.
See GuidelinesForNewRules.md for contributing a new Code Analysis rule to the repo.
See VERSIONING.md for the versioning scheme for all analyzer packages built out of this repo.
Recommended Analyzer Package Version:
Required Visual Studio Version: Visual Studio 2019 16.9 RTW or later
Required .NET SDK Version: .NET 5.0 SDK or later
The documentation for .NET SDK Analyzers can be found here