xunit.analyzers 1.21.0

Prefix Reserved

Requires NuGet 2.12 or higher.

dotnet add package xunit.analyzers --version 1.21.0
                    
NuGet\Install-Package xunit.analyzers -Version 1.21.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="xunit.analyzers" Version="1.21.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="xunit.analyzers" Version="1.21.0" />
                    
Directory.Packages.props
<PackageReference Include="xunit.analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add xunit.analyzers --version 1.21.0
                    
#r "nuget: xunit.analyzers, 1.21.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=xunit.analyzers&version=1.21.0
                    
Install xunit.analyzers as a Cake Addin
#tool nuget:?package=xunit.analyzers&version=1.21.0
                    
Install xunit.analyzers as a Cake Tool

About This Project

This project contains source code analysis and cleanup rules for xUnit.net. Analysis and fixes are only supported with C#.

Requirements: xUnit.net v2 or v3. Supported in Visual Studio 2019 16.11+ or 2022 17.4+ (as well as via command line builds with Roslyn 3.11+). Other environments (such as Mono or JetBrains Rider) may be able to use these analyzers as well; support and issue resolution will be provided by those third parties and not by xUnit.net itself.

Documentation: a list of supported rules is available at https://xunit.net/xunit.analyzers/rules/

Bugs and issues: please visit the core xUnit.net project issue tracker.

Building: see BUILDING.md.

How to install

How to uninstall

  • If you are using xUnit.net v3 and do not wish to use the analyzers package, replace the package reference to xunit.v3 with the corresponding versions of xunit.v3.core and xunit.v3.assert.

  • If you are using xUnit.net v2 2.3.0 or higher and do not wish to use the analyzers package, replace the package reference to xunit with the corresponding versions of xunit.core and xunit.assert.

  • If you are using xUnit.net v2 v2.2.0 or earlier: remove the reference to the xunit.analyzers NuGet package.

Analysis and Code Fix in Action

Analyzer in action animation

Latest Builds

Stable Latest CI (how to use) Build status
v3 core framework alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image
v2 core framework alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image
xunit.analyzers alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image
xunit.runner.visualstudio alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

For complete CI package lists, please visit the feedz.io package search. A free login is required.

About xUnit.net

<img align="right" width="100px" src="https://raw.githubusercontent.com/xunit/media/main/dotnet-foundation.svg" />

xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. Written by the original inventor of NUnit v2, xUnit.net is the latest technology for unit testing C# and F# (other .NET languages may work as well, but are unsupported). xUnit.net works with Visual Studio, Visual Studio Code, ReSharper, CodeRush, and TestDriven.NET. It is part of the .NET Foundation, and operates under their code of conduct. It is licensed under Apache 2 (an OSI approved license).

For project documentation, please visit the xUnit.net project home.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (43)

Showing the top 5 NuGet packages that depend on xunit.analyzers:

Package Downloads
xunit

xUnit.net is a developer testing framework, built to support Test Driven Development, with a design goal of extreme simplicity and alignment with framework features. Installing this package installs xunit.core, xunit.assert, and xunit.analyzers.

xunit.v3

xUnit.net is a developer testing framework, built to support Test Driven Development, with a design goal of extreme simplicity and alignment with framework features. Supports .NET Framework 4.7.2 or later and .NET 8 or later. Installing this package installs xunit.v3.core, xunit.v3.assert, and xunit.analyzers.

Reo.Core.Testing

Package Description

Reo.Core.IntegrationTesting

Package Description

M5x.Testing

Macula Base Testing Library

GitHub repositories (163)

Showing the top 20 popular GitHub repositories that depend on xunit.analyzers:

Repository Stars
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
marticliment/UniGetUI
UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
SignalR/SignalR
Incredibly simple real-time web for .NET
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
ldqk/Masuit.Tools
全龄段友好的C#万能工具库,码数吐司库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展、Excel导出等常用封装。诸多功能集一身,代码量不到2MB!
dotnet-state-machine/stateless
A simple library for creating state machines in C# code
aspnet/Mvc
[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
xunit/xunit
xUnit.net is a free, open source, community-focused unit testing tool for .NET.
Richasy/Bili.Copilot
B站第三方 Windows 桌面客户端,使用 Windows App SDK 构建的原生应用
dotnet/samples
Sample code referenced by the .NET documentation
hirschmann/nbfc
NoteBook FanControl
cairoshell/cairoshell
Cairo is a customizable, intuitive desktop environment for Windows.
microsoft/Git-Credential-Manager-for-Windows
Secure Git credential storage for Windows with support for Visual Studio Team Services, GitHub, and Bitbucket multi-factor authentication.
SteamRE/SteamKit
SteamKit2 is a .NET library designed to interoperate with Valve's Steam network. It aims to provide a simple, yet extensible, interface to perform various actions on the network.
aspnet/KestrelHttpServer
[Archived] A cross platform web server for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
dotnet/macios
.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
MichaCo/CacheManager
CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
Version Downloads Last updated
1.21.0 85,032 4/5/2025
1.20.0 1,044,906 2/7/2025
1.19.0 603,188 1/10/2025
1.18.0 10,021,869 12/16/2024
1.17.0 476,773 11/8/2024
1.16.0 21,781,201 8/31/2024
1.16.0-pre.22 11,964 7/31/2024
1.15.0 16,919,395 7/8/2024
1.14.0 10,800,027 5/25/2024
1.13.0 6,402,548 4/27/2024
1.12.0 4,307,891 4/11/2024
1.11.0 13,827,677 2/16/2024
1.10.0 8,957,321 1/15/2024
1.9.0 2,420,973 1/5/2024
1.8.0 1,662,848 12/22/2023
1.7.0 2,719,115 12/9/2023
1.6.0 5,549,863 11/18/2023
1.5.0 64,814 11/11/2023
1.4.0 17,309,308 10/13/2023
1.4.0-pre.9 17,996 10/8/2023
1.3.0 4,532,199 9/18/2023
1.3.0-pre.19 33,217 9/2/2023
1.3.0-pre.13 62,754 8/7/2023
1.3.0-pre.6 54,810 7/21/2023
1.2.0 14,187,523 7/6/2023
1.2.0-pre.48 5,914 7/3/2023
1.2.0-pre.27 23,099 6/21/2023
1.2.0-pre.24 12,261 6/15/2023
1.2.0-pre.9 43,362 5/31/2023
1.2.0-pre.7 57,748 5/6/2023
1.1.0 2,613,604 12/4/2022
1.0.0 101,153,371 8/1/2022
0.12.0-pre.24 1,581 7/25/2022
0.12.0-pre.19 72,030 10/3/2021
0.10.0 298,914,631 7/11/2018
0.9.0 1,195,376 5/14/2018
0.8.0 2,434,340 11/19/2017
0.7.0 27,825,770 9/1/2017
0.6.1 31,570 8/15/2017
0.6.0 177,452 8/4/2017
0.5.0 88,652 6/25/2017
0.4.0 6,543 6/18/2017
0.3.0 283,926 5/20/2017
0.2.0 7,726 5/15/2017
0.1.0 200,008 5/5/2017