For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

Install the MongoDB C# Analyzer

Learn how to install the C# Analyzer in your .NET application.

To install the C# Analyzer, run the following command from the root directory of your .NET project:

dotnet add package MongoDB.Analyzer -v 2.0.0

To view the NuGet page for the C# Analyzer, see MongoDB.Analyzer on NuGet Gallery.

To learn more about installing NuGet packages from the command line, see NuGet CLI Reference from Microsoft.

To learn more about installing NuGet packages from Visual Studio, see Install and manage packages in Visual Studio using the NuGet Package Manager from Microsoft.