A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1418 below:

CA1418: Use valid platform string (code analysis) - .NET

Property Value Rule ID CA1418 Title Validate platform compatibility Category Interoperability Fix is breaking or non-breaking Non-breaking Enabled by default in .NET 9 As warning Cause

The platform compatibility analyzer requires a valid platform name and version. Violations are reported if the platform string provided to the OSPlatformAttribute constructor consists of an unknown platform name or if the optional version part is invalid.

Rule description

The platform compatibility attributes derived from OSPlatformAttribute use string literals for operating system (OS) platform names with an optional version part. The string should consist of a known platform name and either no version part or a valid version part.

The known platform names list is populated from two places:

If the platform string contains a version part, it should be a valid Version with the following format: major.minor[.build[.revision]].

Violations How to fix violations When to suppress warnings

Using an unknown platform name or an invalid version is not recommended, so you shouldn't suppress this rule.

See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4