MSTest.Analyzers 4.5.2

MSTest.Analyzers

MSTest is Microsoft supported Test Framework.

This package includes static code analyzers for C# and VB.NET helping you to better use and design your tests. For access to the testing framework, install the MSTest.TestFramework package.

Pinning constant contracts

MSTEST0032 reports assertions whose conditions are always true, but permits Assert.AreEqual(16, Protocol.HeaderSize) when HeaderSize is a const field in a referenced assembly. Comparing an independently written literal with a dependency's constant can pin a compatibility contract: changing the constant and recompiling the test makes the assertion fail. Replacing the dependency without recompiling the test does not update an inlined constant.

The exemption accepts literal values (including strings and signed numbers) on either side, named arguments, parentheses, and implicit built-in conversions. It does not apply to constants compiled into the test assembly, including linked/shared source. Local constants, arithmetic expressions, explicit casts, and self-comparisons remain diagnostic. Boolean assertions such as Assert.IsTrue(Protocol.HeaderSize == 16) are unchanged, as is the existing exemption for pinning enum members cast to their exact underlying type.

Showing the top 20 packages that depend on MSTest.Analyzers.

Packages Downloads
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
63
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
60
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
59
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
54
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
54
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
53
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0 - .NET 6.0 Windows.18362+ - UWP 10.0.16299
52
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
52
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
51
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
50
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
47
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0 - .NET 6.0 Windows.18362+ - UWP 10.0.16299
47
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
45
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET 8.0+ - .NET 8.0 Windows.18362+ (WinUI) - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
44
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
44
MSTest.TestFramework
MSTest is Microsoft supported Test Framework. This package includes the libraries for writing tests with MSTest. To ensure discovery and execution of your tests, install the MSTest.TestAdapter package. Supported platforms: - .NET 4.6.2+ - .NET Core 3.1+ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 - UWP 10.0.17763 with .NET 9+
43

This package has no dependencies.

Version Downloads Last updated
4.5.2 3 10/27/2026
4.5.1 15 10/09/2026
4.4.1 28 09/16/2026
4.4.0 24 09/04/2026
4.3.3 27 07/30/2026
4.3.2 31 07/16/2026
4.3.0 27 07/12/2026
4.2.3 51 05/16/2026
4.2.2 40 05/02/2026
4.2.1 49 04/09/2026
4.1.0 44 02/05/2026
4.0.2 52 12/12/2025
4.0.1 5 10/07/2026
4.0.0 2 10/09/2026
4.0.0-preview.25480.4 4 10/06/2026
4.0.0-preview.25465.3 4 09/30/2026
4.0.0-preview.25454.2 3 10/09/2026
4.0.0-preview.25452.10 3 10/10/2026
4.0.0-preview.25415.9 6 10/09/2026
4.0.0-preview.25372.6 37 12/13/2025
4.0.0-preview.25358.7 4 10/10/2026
3.11.1 8 10/09/2026
3.11.0 6 09/28/2026
3.10.5 4 10/08/2026
3.10.4 2 10/11/2026
3.10.3 29 12/13/2025
3.10.2 4 10/09/2026
3.10.1 3 10/08/2026
3.10.0 5 10/06/2026
3.9.3 57 12/13/2025
3.9.2 3 10/06/2026
3.9.1 4 10/07/2026
3.9.0 6 10/05/2026
3.9.0-preview.25167.10 33 12/13/2025
3.8.3 6 10/01/2026
3.8.2 44 12/27/2025
3.8.1 4 10/07/2026
3.8.0 2 10/16/2026
3.7.3 7 09/28/2026
3.7.2 3 10/08/2026
3.7.1 5 10/08/2026
3.7.0 3 10/01/2026
3.6.4 5 10/09/2026
3.6.3 4 10/10/2026
3.6.2 5 10/10/2026
3.6.1 4 10/09/2026
3.6.0 3 10/10/2026
3.5.2 36 01/02/2026
3.5.1 5 10/06/2026
3.5.0 7 10/08/2026
3.5.0-preview.24325.7 5 10/08/2026
3.4.3 3 10/06/2026
3.4.2 3 10/05/2026
3.4.1 4 10/10/2026
3.4.0 3 10/08/2026
3.3.1 3 10/10/2026
3.3.0 6 10/04/2026
3.3.0-preview.24164.4 5 10/01/2026
3.2.2 3 10/07/2026
3.2.1 43 01/02/2026
3.2.0 5 10/09/2026
3.2.0-preview.24069.3 5 10/09/2026
3.2.0-preview.23623.1 3 10/01/2026
3.2.0-preview.23622.1 4 10/10/2026